-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
69 lines (64 loc) · 1.49 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
65
66
67
68
69
version: "3.7"
services:
client:
container_name: client_container
# command: tail -f /dev/null # DEBUG: uncomment to keep container running
depends_on:
- application
build:
dockerfile: Dockerfile
context: ./frontend
args:
- REACT_APP_API_BASE_URL=$API_BASE_URL
volumes:
- ./frontend:/app/frontend
networks:
- frontend-network
# Nginx Reserse Proxy
nginx:
image: nginx:alpine
container_name: nginx
# command: tail -f /dev/null # DEBUG: uncomment to keep container running
depends_on:
- client
- application
ports:
- 80:80
volumes:
- ./nginx/config:/etc/nginx
- ./nginx/certs:/etc/ssl/private
networks:
- backend-network
- frontend-network
database:
image: mysql
container_name: db_container
environment:
- MYSQL_DATABASE=cbums
- MYSQL_ROOT_HOST=%
- MYSQL_ROOT_PASSWORD=1234
command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
cap_add:
- SYS_NICE
volumes:
- "./database/spring_social/:/var/lib/mysql"
ports:
- "3306:3306"
networks:
- backend-network
application:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8080"
container_name: application_container
restart: always
depends_on:
- database
networks:
- backend-network
- frontend-network
networks:
backend-network:
frontend-network: