-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
27 lines (25 loc) · 842 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
27 lines (25 loc) · 842 Bytes
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
# Local development database only (the app itself runs via npm — front on Vercel,
# API as a plain Node process). Spin it up with `docker compose up -d`, then run
# the migrations: `cd backend && npm run migrate`.
#
# `MYSQL_DATABASE` creates `frameset_db` on first start, so no manual
# `CREATE DATABASE` is needed when using Docker. Point backend/.env at it:
# DB_HOST=localhost DB_USER=root DB_PASSWORD=root DB_NAME=frameset_db
services:
db:
image: mysql:8
restart: unless-stopped
environment:
MYSQL_DATABASE: frameset_db
MYSQL_ROOT_PASSWORD: root
ports:
- "3306:3306"
volumes:
- frameset_db_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-proot"]
interval: 10s
timeout: 5s
retries: 5
volumes:
frameset_db_data: