-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
53 lines (49 loc) · 1.22 KB
/
docker-compose.yaml
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
version: "3.8"
services:
goober-db:
image: mariadb:10.5.8
container_name: goober-db
environment:
MYSQL_ROOT_PASSWORD: goober
MYSQL_DATABASE: goober
MYSQL_USER: goober
MYSQL_PASSWORD: goober
volumes:
- goober_db_data:/var/lib/mysql:delegated
- ./docker/seed_database.sql:/docker-entrypoint-initdb.d/seed_database.sql
ports:
- "3306:3306"
goober-api:
depends_on:
- goober-db
build:
context: ./api
container_name: goober-api
command: bash -c 'uvicorn --reload --host=0.0.0.0 src.api:app'
environment:
DB_DIALECT: mysql
DB_HOST: goober-db
DB_PORT: 3306
DB_NAME: goober
DB_USER: goober
DB_PASSWORD: goober
volumes:
- ./api:/opt/apps/api
ports:
- "8000:8000"
goober-web-app:
depends_on:
- goober-api
build:
context: ./app
container_name: goober-web-app
environment:
REACT_APP_WEBSOCKET_URL: localhost:8000
volumes:
# https://dev.to/codemochi/hot-module-reloading-with-next-js-docker-development-environment-in-4-steps-32i8
- ./app:/opt/apps/app
- /opt/apps/app/node_modules
ports:
- "3000:3000"
volumes:
goober_db_data: {}