-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yaml
67 lines (63 loc) Β· 1.23 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: '3.1'
networks:
heymoji-net:
driver: bridge
services:
api:
build: ./
container_name: heymoji-api
platform: linux/amd64
tty: true
stdin_open: true
ports:
- "8000:80"
networks:
- heymoji-net
volumes:
- ./:/app
depends_on:
- db
command:
- sh
- -c
- |
pip install --upgrade pip
pip install -r requirements.txt
alembic upgrade head
gunicorn -k uvicorn.workers.UvicornWorker -c /gunicorn_conf.py app.main:app
web:
build:
dockerfile: web.Dockerfile
ports:
- "8080:8080"
container_name: heymoji-web
platform: linux/amd64
tty: true
volumes:
- ./frontend:/app
stdin_open: true
depends_on:
- api
networks:
- heymoji-net
command:
- sh
- -c
- |
npm install
npm run serve
db:
image: mysql:latest
platform: linux/amd64
container_name: heymoji-db
#restart: always
ports:
- '33080:3306'
volumes:
- ./db/data:/var/lib/mysql
- ./db/my.cnf:/etc/mysql/conf.d/my.cnf:ro
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: heymoji
networks:
- heymoji-net