-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (48 loc) · 975 Bytes
/
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
version: '3.2'
services:
# Client app
web:
container_name: web
image: ferdiardiansa/social-media:latest
ports:
- 3007:80
networks:
- sh-client
volumes:
- client-app-data:/usr/share/nginx/html
deploy:
replicas: 5
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: on-failure
# Client web server
client-web-server:
container_name: sh-client-web-server
build:
context: .
dockerfile: '.docker/client-web-server/Dockerfile'
cache_from:
- nginx:latest
args:
- CLIENT_PORT=${CLIENT_PORT}
ports:
- ${CLIENT_PORT}:80
volumes:
- ./logs/client-web-server/:/var/log/nginx
restart: always
depends_on:
- web
env_file:
- .env
networks:
- sh-client
volumes:
- client-app-data:/usr/app
deploy:
replicas: 2
networks:
sh-client:
volumes:
client-app-data: