-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (78 loc) · 1.96 KB
/
docker-compose.yml
File metadata and controls
82 lines (78 loc) · 1.96 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: ttorang-server
env_file:
- .env
environment:
DATABASE_URL: mysql://root:password@mysql:3306/ttorang
REDIS_URL: ${REDIS_URL:-redis://redis:6379}
PORT: ${PORT:-3000}
CHOKIDAR_USEPOLLING: "true"
CHOKIDAR_INTERVAL: "500"
GOOGLE_APPLICATION_CREDENTIALS: /app/gcp-key.json
GCS_BUCKET_NAME: ttorang-upload-dev
FFMPEG_PATH: /usr/bin/ffmpeg
FFPROBE_PATH: /usr/bin/ffprobe
command: sh -c "npx prisma migrate deploy && npm run dev"
volumes:
- ./src:/app/src
- ./prisma:/app/prisma
- ./src/gcp-key.json:/app/gcp-key.json:ro
ports:
- "3000:3000"
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
networks:
- ttorang-network
redis:
image: redis:7-alpine
container_name: ttorang-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: ["redis-server", "--appendonly", "yes"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
restart: unless-stopped
networks:
- ttorang-network
mysql:
image: mysql:8.0
container_name: ttorang-mysql
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: ttorang
TZ: Asia/Seoul
command:
- --default-authentication-plugin=mysql_native_password
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -uroot -p$$MYSQL_ROOT_PASSWORD --silent"]
interval: 10s
timeout: 5s
retries: 10
restart: unless-stopped
networks:
- ttorang-network
volumes:
redis_data:
mysql_data:
networks:
ttorang-network:
driver: bridge