-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
87 lines (84 loc) · 1.9 KB
/
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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: "3.7"
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
command: bash -c "python manage.py makemigrations &&
python manage.py migrate &&
python manage.py init_admin &&
python manage.py runserver 0.0.0.0:8000"
volumes:
- ./backend/:/app/
ports:
- 8000:8000
env_file:
- ./.env
depends_on:
- mysql_db
mysql_db:
image: mariadb:10.8
volumes:
- $DATA_DIR/mysql:/var/lib/mysql/
ports:
- 3307:3306
environment:
- MYSQL_USER=${SQL_USER}
- MYSQL_PASSWORD=${SQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${SQL_PASSWORD}
- MYSQL_DATABASE=${SQL_DATABASE}
redis:
image: redis:6.0.9
ports:
- 6379:6379
command: redis-server
volumes:
- $DATA_DIR/redis-data:/var/lib/redis
- $DATA_DIR/redis.conf:/usr/local/etc/redis/redis.conf
celery:
build: ./backend
command: celery -A backend worker -l info --concurrency=10 -n worker1@%h
volumes:
- ./backend/:/app/
env_file:
- ./.env
depends_on:
- mysql_db
- redis
celery-beat:
build: ./backend
command: celery -A backend beat -l info
volumes:
- ./backend/:/app/
env_file:
- ./.env
depends_on:
- mysql_db
- redis
frontend:
env_file:
- ./.env
build:
context: ./frontend
dockerfile: Dockerfile
command: npm run dev
restart: always
stdin_open: true
volumes:
- ./frontend:/app/frontend:rw
ports:
- "3000:3000"
phpmyadmin:
env_file:
- ./.env
image: phpmyadmin
restart: always
ports:
- "8080:80"
environment:
- PMA_ARBITARY=1
- MYSQL_ROOT_PASSWORD=${SQL_ROOT_PASSWORD}
- PMA_PORT="${SQL_PORT_MYSQL}
- PMA_HOST=${SQL_HOST_MYSQL}
volumes:
- $DATA_DIR/sessions:/sessions