-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathapollo-docker-compose.yml
79 lines (78 loc) · 2.63 KB
/
apollo-docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# usage of testing config: docker-compose --env-file .env.dev config
# usage of run: docker-compose --env-file .env.dev up -d
version: "3"
networks:
common-network:
driver: bridge
services:
apollo-configservice:
image: "apolloconfig/apollo-configservice:${IMAGE_TAG:-1.7.1}"
container_name: apollo-configservice
restart: always
hostname: apollo-configservice
networks:
common-network:
aliases:
- configservice
expose:
- ${CONFIG_SERVER_PORT}
ports:
- ${CONFIG_SERVER_PORT}:${CONFIG_SERVER_PORT}
volumes:
- "/tmp/apollologs:/opt/logs"
environment:
- SPRING_DATASOURCE_URL=${SPRING_DATASOURCE_CONFIG_URL}
- SPRING_DATASOURCE_USERNAME
- SPRING_DATASOURCE_PASSWORD
- EUREKA_INSTANCE_IP_ADDRESS
- APOLLO_EUREKA_SERVER_ENABLED=${APOLLO_EUREKA_SERVER_ENABLED:-false}
- SERVER_PORT=${CONFIG_SERVER_PORT}
apollo-adminservice:
image: "apolloconfig/apollo-adminservice:${IMAGE_TAG:-1.7.1}"
container_name: apollo-adminservice
restart: always
hostname: apollo-adminservice
networks:
common-network:
aliases:
- adminservice
expose:
- ${ADMIN_SERVER_PORT}
ports:
- ${ADMIN_SERVER_PORT}:${ADMIN_SERVER_PORT}
volumes:
- "/tmp/apollologs:/opt/logs"
environment:
- SPRING_DATASOURCE_URL=${SPRING_DATASOURCE_CONFIG_URL}
- SPRING_DATASOURCE_USERNAME
- SPRING_DATASOURCE_PASSWORD
- EUREKA_INSTANCE_IP_ADDRESS
- SERVER_PORT=${ADMIN_SERVER_PORT}
apollo-portal:
image: "apolloconfig/apollo-portal:${IMAGE_TAG:-1.7.1}"
container_name: apollo-portal
restart: always
hostname: apollo-portal
networks:
common-network:
aliases:
- portal
depends_on:
- apollo-configservice
- apollo-adminservice
expose:
- ${PORTAL_SERVER_PORT}
ports:
- ${PORTAL_SERVER_PORT}:${PORTAL_SERVER_PORT}
volumes:
- "/tmp/apollologs:/opt/logs"
environment:
- SPRING_DATASOURCE_URL=${SPRING_DATASOURCE_PORTAL_URL}
- SPRING_DATASOURCE_USERNAME
- SPRING_DATASOURCE_PASSWORD
- EUREKA_INSTANCE_IP_ADDRESS
- SERVER_PORT=${PORTAL_SERVER_PORT}
- APOLLO_PORTAL_ENVS=dev,prod
- DEV_META
- PROD_META
command: ["/bin/sh", "-c", "[[ ! -f wait-for-it.sh ]] && wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && chmod +x wait-for-it.sh; ./wait-for-it.sh apollo-configservice:${CONFIG_SERVER_PORT} --timeout=300 --strict -- ./wait-for-it.sh apollo-adminservice:${ADMIN_SERVER_PORT} --timeout=300 --strict -- /apollo-portal/scripts/startup.sh"]