-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
48 lines (43 loc) · 1.15 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
version: '3.9'
services:
web:
build: .
command: bash -c "python manage.py migrate && python manage.py collectstatic --noinput && python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/app
- static_volume:/app/staticfiles
- media_volume:/app/media
expose:
- "8000"
depends_on:
- db
env_file:
- .env
db:
image: mysql:8.0
volumes:
- mysql_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: "oefhz" # Set the MySQL root password
MYSQL_DATABASE: "oefhz" # Set the MySQL database name
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- "8080:80"
environment:
PMA_HOST: db # Set the host name for phpMyAdmin to connect to (should match the service name of your MySQL container)
MYSQL_ROOT_PASSWORD: "oefhz" # Set the MySQL root password
nginx:
image: nginx:latest
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- static_volume:/app/staticfiles
- media_volume:/app/media
ports:
- "80:80"
depends_on:
- web
volumes:
mysql_data:
static_volume:
media_volume: