-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (37 loc) · 902 Bytes
/
docker-compose.yml
File metadata and controls
37 lines (37 loc) · 902 Bytes
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
version: '3'
services:
db-subscriptions:
platform: linux/x86_64
image: mysql:8.0
command: mysqld --default_authentication_plugin=mysql_native_password
environment:
MYSQL_DATABASE: 'subscriptions'
MYSQL_USER: 'djangouser'
MYSQL_PASSWORD: 'password'
MYSQL_ROOT_PASSWORD: 'password'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
ports:
- '3306:3306'
expose:
- '3306'
volumes:
- /tmp/app/mysqld:/var/run/mysqld
- my-db:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
ports:
- "8000:8000"
volumes:
- .:/app
- /tmp/app/mysqld:/run/mysqld
depends_on:
db-subscriptions:
condition: service_healthy
volumes:
my-db:
driver: local