-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
56 lines (55 loc) · 1.11 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
version: '3'
volumes:
mysql-data:
driver: local
mysql-log:
driver: local
mysql-conf:
driver: local
services:
db:
image: mysql
networks:
- backend
ports:
- 3306:3306
volumes:
- ./codigo-fonte/mysql/database_schema.sql:/docker-entrypoint-initdb.d/dump.sql
- "mysql-data:/var/lib/mysql"
- "mysql-log:/var/log/mysql"
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_DATABASE: notes
MYSQL_USER: notes-api
MYSQL_PASSWORD: notes-api
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
app:
build: ./codigo-fonte/app/
ports:
- 8080:8080
networks:
- frontend
- backend
depends_on:
- db
environment:
DATABASE_HOST: 'db'
DATABASE_USER: 'notes-api'
DATABASE_PASS: 'notes-api'
proxy:
image: nginx:latest
volumes:
- ./codigo-fonte/nginx/nginx.conf:/etc/nginx/nginx.conf
ports:
- 80:80
- 443:443
networks:
- frontend
depends_on:
- db
- app
networks:
frontend:
driver: bridge
backend:
driver: bridge