-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
49 lines (46 loc) · 1.28 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
version: "3"
services:
smile_music_db:
image: postgres:13.2
restart: always
container_name: "smile_music_db"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -h ${POSTGRES_HOST} -p ${POSTGRES_PORT} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
environment:
- POSTGRES_HOST
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_PORT
ports:
- "5432:5432"
volumes:
- ./database:/var/lib/postgresql/data
- ./initdb:/docker-entrypoint-initdb.d
smile_music_py:
restart: always
build:
context: .
container_name: "smile_music_py"
tty: true
depends_on:
smile_music_db:
condition: service_healthy
command: python smile_music.py
environment:
- POSTGRES_HOST
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_PORT
- SMILEMUSIC_DISCORD_TOKEN
- SMILEMUSIC_PREFIX
- SMILEMUSIC_ENV=dev
volumes:
- ./python:/opt
volumes:
database:
driver: local