-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (46 loc) · 1.09 KB
/
docker-compose.yml
File metadata and controls
50 lines (46 loc) · 1.09 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
services:
# MySQL Database
mysql:
image: mysql:8.0
container_name: playproof-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: playproof
MYSQL_USER: playproof_user
MYSQL_PASSWORD: playproof_password
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-prootpassword"]
interval: 10s
timeout: 5s
retries: 5
networks:
- playproof-network
# Application
app:
build:
context: .
dockerfile: Dockerfile
container_name: playproof-app
restart: unless-stopped
ports:
- "3000:3000"
environment:
NODE_ENV: production
PORT: 3000
DATABASE_URL: mysql://playproof_user:playproof_password@mysql:3306/playproof
depends_on:
mysql:
condition: service_healthy
command: sh -c "npx prisma db push && npm start"
networks:
- playproof-network
volumes:
mysql_data:
networks:
playproof-network:
driver: bridge