forked from apolloconfig/apollo-quick-start
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Dockerfile for apollo quick start | ||
# Build with: | ||
# docker build -t apollo-quick-start . | ||
# Run with: | ||
# docker-compose up | ||
|
||
FROM openjdk:8-jre-alpine | ||
MAINTAINER nobodyiam<https://github.com/nobodyiam> | ||
|
||
COPY apollo-all-in-one.jar /apollo-quick-start/apollo-all-in-one.jar | ||
COPY client /apollo-quick-start/client | ||
COPY demo.sh /apollo-quick-start/demo.sh | ||
COPY portal/apollo-portal.conf /apollo-quick-start/portal/apollo-portal.conf | ||
COPY service/apollo-service.conf /apollo-quick-start/service/apollo-service.conf | ||
|
||
EXPOSE 8070 8080 | ||
|
||
RUN echo "http://mirrors.aliyun.com/alpine/v3.6/main" > /etc/apk/repositories \ | ||
&& echo "http://mirrors.aliyun.com/alpine/v3.6/community" >> /etc/apk/repositories \ | ||
&& apk update upgrade \ | ||
&& apk add --no-cache curl bash \ | ||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ | ||
&& echo "Asia/Shanghai" > /etc/timezone \ | ||
&& sed -i'.bak' '/db_url/s/localhost/db/g' /apollo-quick-start/demo.sh \ | ||
&& sed -i "s/exit 0;/tail -f \/dev\/null/g" /apollo-quick-start/demo.sh | ||
|
||
CMD ["/apollo-quick-start/demo.sh", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: '2' | ||
|
||
services: | ||
apollo-quick-start: | ||
image: apollo-quick-start | ||
container_name: apollo-quick-start | ||
depends_on: | ||
- db | ||
ports: | ||
- "8080:8080" | ||
- "8070:8070" | ||
volumes: | ||
- /tmp/logs:/opt/logs | ||
links: | ||
- db | ||
|
||
db: | ||
image: mysql:5.7 | ||
container_name: db | ||
environment: | ||
TZ: Asia/Shanghai | ||
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' | ||
depends_on: | ||
- dbdata | ||
ports: | ||
- "13306:3306" | ||
volumes: | ||
- ./sql:/docker-entrypoint-initdb.d | ||
volumes_from: | ||
- dbdata | ||
|
||
dbdata: | ||
image: alpine:latest | ||
container_name: dbdata | ||
volumes: | ||
- /var/lib/mysql |