-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
63 lines (51 loc) · 1.09 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
services:
db:
#build existing mysql image from dockerhub
image: mysql
ports:
#- 33060:33060
- 3306:3306
#- 3307:3306
#Note: inner port should be 3306 and outer port can be mapped to any port
#Ex: - Outer:Inner
#Ex: - 3307:3306
restart: unless-stopped
#Environment variables are set from .env file
environment:
MYSQL_ROOT_PASSWORD: mysqlpassADAD12
MYSQL_AUTHENTICATION_PLUGIN: mysql_native_password
networks:
- app-net
volumes:
- ./db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:rw
api:
build: ./api
depends_on:
- db
environment:
MONGO_USERNAME: root
ROOT_MONGO_PASSWORD: mysqlpassADAD12
MONGO_DBNAME: main
networks:
- app-net
web:
build: ./app
depends_on:
- api
networks:
- app-net
nginx:
image: nginx:alpine
depends_on:
- web
- api
ports:
- "3000:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
networks:
- app-net
networks:
app-net:
volumes:
db-data: