-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
42 lines (39 loc) · 987 Bytes
/
docker-compose.yml
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
version: '3.7'
services:
db:
image: mysql:8
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: github_covid_modelling_dev
volumes:
- mysql_data:/var/lib/mysql
ports:
# This helps browse the DB from outside the container in development.
# Comment this out if it's clashing with another MySQL you have running
# for other purposes.
- 3306:3306
web:
build:
context: .
depends_on:
- db
ports:
- 3000:3000
volumes:
- .:/app
- docker_next:/app/.next
- node_modules:/app/node_modules
environment:
DB_USERNAME: user
DB_PASSWORD: password
DB_HOST: db
DB_DATABASE: github_covid_modelling_dev
command: |
sh -c "npm install && npx db-migrate up && npm run dev"
volumes:
docker_next:
node_modules:
mysql_data: