-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.yml
159 lines (153 loc) · 4.64 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
services:
db:
restart: unless-stopped
image: postgres:15-alpine
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=supersecretpassword
redis:
restart: unless-stopped
image: redis:7.0.5-alpine
# Celery
celery:
image: coreproject
restart: unless-stopped
build: ./backend
dns:
- 1.1.1.1
volumes:
- ./media:/code/django_core/media
entrypoint: /code/worker_entrypoint.sh
environment:
- DEBUG=False
# Cache related settings
- CACHE_MIDDLEWARE_SECONDS=10
- REDIS_URL=redis://redis:6379/0
- DJANGO_CACHE_LOCATION=redis://redis:6379/1
- DEFENDER_REDIS_URL=redis://redis:6379/2
# POSTGRS specific codse
- POSTGRES_NAME=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=supersecretpassword
- "POSTGRES_HOST=db"
- POSTGRES_PORT=5432
# Sitename related things
- DJANGO_ALLOWED_HOSTS=backend.${SITE_ADDRESS}
- SITE_ADDRESS=${SITE_ADDRESS}
# Secret Keys
# - MAL_CLIENT_ID=
# - MAL_CLIENT_SECRET=
# - STREAMSB_KEY=
depends_on:
- db
- redis
beat:
image: coreproject
restart: unless-stopped
build: ./backend
dns:
- 1.1.1.1
volumes:
- ./media:/code/django_core/media
entrypoint: /code/beat_entrypoint.sh
environment:
- DEBUG=False
# Cache related settings
- CACHE_MIDDLEWARE_SECONDS=10
- REDIS_URL=redis://redis:6379/0
- DJANGO_CACHE_LOCATION=redis://redis:6379/1
- DEFENDER_REDIS_URL=redis://redis:6379/2
# POSTGRS specific codse
- POSTGRES_NAME=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=supersecretpassword
- "POSTGRES_HOST=db"
- POSTGRES_PORT=5432
# Sitename related things
- DJANGO_ALLOWED_HOSTS=backend.${SITE_ADDRESS}
- SITE_ADDRESS=${SITE_ADDRESS}
# Secret Keys
# - MAL_CLIENT_ID=
# - MAL_CLIENT_SECRET=
# - STREAMSB_KEY=
depends_on:
- db
- redis
- celery
# Backend
django:
image: coreproject
restart: unless-stopped
build: ./backend
entrypoint: /code/server_entrypoint.sh
dns:
- 1.1.1.1
volumes:
- ./media:/code/django_core/media
- ./logs:/code/logs
environment:
- DEBUG=False
# Cache related settings
- CACHE_MIDDLEWARE_SECONDS=10
- REDIS_URL=redis://redis:6379/0
- DJANGO_CACHE_LOCATION=redis://redis:6379/1
- DEFENDER_REDIS_URL=redis://redis:6379/2
# POSTGRS specific codse
- POSTGRES_NAME=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=supersecretpassword
- "POSTGRES_HOST=db"
- POSTGRES_PORT=5432
# Sitename related things
- DJANGO_ALLOWED_HOSTS=backend.${SITE_ADDRESS}
- SITE_ADDRESS=${SITE_ADDRESS}
# Secret Keys
# - MAL_CLIENT_ID=
# - MAL_CLIENT_SECRET=
# - STREAMSB_KEY=
depends_on:
- db
- redis
- celery
- beat
# Frontend
anime:
image: frontend
restart: unless-stopped
build: ./frontend/AnimeCore
dns: 1.1.1.1
environment:
- PORT=3000
- HOST=0.0.0.0
# Varnish
# django-varnish:
# image: varnish:fresh
# volumes:
# - ./varnish/django.vcl:/etc/varnish/default.vcl:ro
# depends_on:
# - django
# Web server
caddy:
image: caddy:alpine
restart: unless-stopped
dns:
- 1.1.1.1
ports:
- 80:80 # Needed for the ACME HTTP-01 challenge.
- 443:443
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- ./caddy-config:/config
- ./caddy-data:/data
- ./media:/srv/media
- ./logs:/srv/logs
environment:
- SITE_ADDRESS=${SITE_ADDRESS}
- LOG_FILE=/data/access.log
depends_on:
- django
- anime