-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
54 lines (45 loc) · 1.13 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
version: '3.7'
x-app: &default-app
build:
context: "."
volumes:
- .:/geraipiapps
restart: "unless-stopped"
depends_on:
- db
env_file:
- .env
networks:
geraipinetwork:
services:
db:
image: mariadb:latest
container_name: geraipi_db
volumes:
- ./mysql:/var/lib/mysql
- geraipi_sql_data:/var/lib/postgresql/data
environment:
- MARIADB_USER=${DB_USER}
- MARIADB_DATABASE=${DB_NAME}
- MARIADB_PASSWORD=${DB_PASSWORD}
- MARIADB_ROOT_PASSWORD=${DB_PASSWORD}
networks:
geraipinetwork:
apps:
<<: *default-app
command: >
sh -c "sh wait-for-mysql.sh && python manage.py makemigrations && python manage.py migrate && python manage.py tailwind install && python manage.py runserver 0.0.0.0:4000"
ports:
- 4000:4000
tailwind:
<<: *default-app
command: "python manage.py tailwind start"
# Without tty, no stdin, and tailwind watcher aborts
# https://github.com/tailwindlabs/tailwindcss/issues/5324
tty: true
volumes:
geraipi_static_volume:
geraipi_media_volume:
geraipi_sql_data:
networks:
geraipinetwork: