-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
64 lines (63 loc) · 1.22 KB
/
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
version: '3'
services:
db:
build: './sql'
ports:
- '${DB_PORT}:${DB_PORT}'
env_file:
- .env
volumes:
- db_data:/var/lib/mysql
networks:
rephrasing_net:
ipv4_address: '${DB_HOST}'
deploy:
resources:
limits:
cpus: '0.1'
memory: '512M'
api:
build: './server'
ports:
- '${SERVER_PORT}:${SERVER_PORT}'
depends_on:
- db
env_file:
- .env
networks:
rephrasing_net:
ipv4_address: '${SERVER_HOSTNAME}'
deploy:
resources:
limits:
cpus: '0.05'
memory: '256M'
web:
build: './client'
ports:
- '${CLIENT_PORT}:${CLIENT_PORT}'
env_file:
- .env
environment:
- 'REACT_APP_SERVER_HOSTNAME=${SERVER_HOSTNAME}'
- 'REACT_APP_SERVER_PORT=${SERVER_PORT}'
- 'REACT_APP_HTTPS=${HTTPS}'
depends_on:
- api
networks:
rephrasing_net:
ipv4_address: '${CLIENT_HOSTNAME}'
deploy:
resources:
limits:
cpus: '0.05'
memory: '256M'
volumes:
db_data:
networks:
rephrasing_net:
driver: bridge
ipam:
config:
- subnet: '${NETWORK_IP}'
gateway: '${GATEWAY_IP}'