forked from gpbenton/gpodder
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
90 lines (83 loc) · 2.34 KB
/
docker-compose.yaml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# After initial start need to do
# docker exec -it gpodder_app_1 python manage.py migrate
version: '2.0'
volumes:
db:
services:
app:
build: .
restart: always
depends_on:
- db
- redis
environment:
EMAIL_BACKEND: django.core.mail.backends.console.EmailBackend
SECRET_KEY: ${SECRET_KEY}
DATABASE_URL: postgres://mygpo:mygpo@db/mygpo
CELERY_BROKER_URL: "redis://redis:6379//"
# Debug must be true when using development server
DEBUG: ${DEBUG}
volumes:
- "./static:/usr/src/mygpo/staticfiles"
ports:
- "8000:8000"
networks:
- default
- caddy
db:
image: "postgres:13.2-alpine"
restart: always
volumes:
- "db:/var/lib/postgresql/data"
- "./postgres_init:/docker-entrypoint-initdb.d"
environment:
POSTGRES_USER: mygpo
POSTGRES_PASSWORD: mygpo
restart: always
expose:
- "5432"
redis:
image: "redis:6.2-alpine"
restart: always
beat:
image: gpodder_app
restart: always
depends_on:
- app
environment:
EMAIL_BACKEND: django.core.mail.backends.console.EmailBackend
SECRET_KEY: ${SECRET_KEY}
DATABASE_URL: postgres://mygpo:mygpo@db/mygpo
LOGGING_CELERY_LEVEL: INFO
entrypoint:
- celery
- -A
- mygpo
- beat
- -b
- redis://redis:6379//
- --pidfile
- /tmp/celerybeat.pid
- --scheduler
- django_celery_beat.schedulers:DatabaseScheduler
worker:
image: gpodder_app
restart: always
depends_on:
- app
environment:
EMAIL_BACKEND: django.core.mail.backends.console.EmailBackend
SECRET_KEY: ${SECRET_KEY}
DATABASE_URL: postgres://mygpo:mygpo@db/mygpo
LOGGING_CELERY_LEVEL: INFO
entrypoint:
- celery
- -A
- mygpo
- -b
- "redis://redis:6379//"
- worker
networks:
caddy:
external:
name: caddy_default