forked from pythonalicante/MeetupSelector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (69 loc) · 1.53 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: '3.9'
x-app-common: &app-common
image: python_alc/meetupselector:dev
build:
dockerfile: dockerfiles/Dockerfile
context: .
stdin_open: true
tty: true
env_file:
- ./.env
restart: always
depends_on:
mailhog:
condition: service_started
db:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- postgres_socket:/var/run/postgresql
- ./:/app
services:
db:
container_name: meetupselector_database
image: postgres:14.2
env_file:
- ./.env
volumes:
- postgres_data:/var/lib/postgresql/data/
- postgres_socket:/var/run/postgresql/
healthcheck:
test: pg_isready -q --username=$$POSTGRES_USER --dbname=$$POSTGRES_DB
timeout: 45s
interval: 10s
retries: 10
restart: always
redis:
container_name: meetupselector_redis
image: redis:latest
restart: always
healthcheck:
test: redis-cli ping
timeout: 45s
interval: 10s
retries: 10
mailhog:
container_name: meetupselector_mailhog
image: mailhog/mailhog
ports:
- 8025:8025
celery:
container_name: meetupselector_celery_worker
command: worker
<<: *app-common
celery-beat:
container_name: meetupselector_celery_beat
command: beat
<<: *app-common
django:
container_name: meetupselector_django
command: server
ports:
- 8000:8000
stdin_open: true
tty: true
<<: *app-common
volumes:
postgres_data:
postgres_socket: