-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
47 lines (43 loc) · 1.12 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
version: "3"
services:
app:
build:
context: .
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
restart: unless-stopped
volumes:
- ./app:/app
command: >
sh -c "python manage.py runserver 0.0.0.0:${SERVER_PORT}"
env_file:
- .env
depends_on:
- db
db:
image: mysql:latest
ports:
- '${SQL_PORT}:3306'
restart: unless-stopped
expose:
- '3306'
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
command: --init-file /data/application/init.sql
volumes:
- my-db:/var/lib/mysql
- ./init.sql:/data/application/init.sql
phpmyadmin:
depends_on:
- db
image: phpmyadmin/phpmyadmin
restart: always
ports:
- '${PHPMYADMIN_PORT}:80'
environment:
PMA_HOST: db
volumes:
my-db: