-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
26 lines (23 loc) · 952 Bytes
/
docker-compose.yml
File metadata and controls
26 lines (23 loc) · 952 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
# Planetscale uses mysql `8.0.23-Vitess` which is not available as a container
# PS sql_mode = ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
# But the `STRICT_TRANS_TABLES` causes an error when initializing the db. So it has been removed.
# https://mariadb.com/docs/skysql-dbaas/ref/es23.07/sql-modes/
# Usage
# docker compose up -d
# DATABASE_URL="mysql://root:password@localhost/track-the-hack"
# npx prisma db push
services:
mysql:
image: mysql
restart: always
command: --sql_mode="ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=track-the-hack
ports:
- 3306:3306
volumes:
- mysql_data:/var/lib/mysql
volumes:
mysql_data:
driver: local