forked from jiphyeonjeon-42/backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
53 lines (49 loc) · 1.11 KB
/
docker-compose.yaml
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
version: '3'
services:
nginx:
image: nginx:stable-alpine
container_name: nginx
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
ports:
- 80:80
database:
platform: linux/x86_64
container_name: database
image: mysql:8.0
environment:
- TZ=Asia/Seoul
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
ports:
- 3306:3306
volumes:
- ./database:/docker-entrypoint-initdb.d:ro
- ./database/data:/var/lib/mysql
migration:
container_name: migration
build:
context: ./migration
volumes:
- ./migration/migrations:/migrations
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
backend:
container_name: backend
#image : node:16
build:
context: ./backend
volumes:
#- ./backend/src/:/src/
- ./backend/logs:/logs
#command: ${MODE}
ports:
- 3000:3000
#- 80:80
env_file: .env
volumes:
db_data: