-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (96 loc) · 2.83 KB
/
docker-compose.yml
File metadata and controls
112 lines (96 loc) · 2.83 KB
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
version: "3.9"
services:
db:
image: postgres
volumes:
- ${ACTUAL_DB_PATH}:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
web:
build: .
volumes:
- ${ACTUAL_STORAGE_PATH}:${BOORU_STORAGE_PATH}
- ${ACTUAL_STATIC_PATH}:${STATIC_ROOT}
# Migrations
- ./booru/migrations:/app/booru/migrations
- ./scanner/migrations:/app/scanner/migrations
# Fixtures
- ./additional-fixtures:/app/additional-fixtures
environment:
# Database
- POSTGRES_NAME=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
# - LOAD_FIXTURES
# - DB_MIGRATE
# Secret
# - ROLL_SECRET
# - SECRET_KEY # Feel free to change this in production to something static and secure!
# Booru
- BOORU_STORAGE_PATH
- BOORU_AUTOMATIC_RATING_ENABLED
# Production
- DEBUG=False
# Static
# - INSTALL_JQUERY
# Directory Scanning
# - DIRECTORY_SCAN_ENABLED
depends_on:
- db
nginx:
build: .nginx/
ports:
- "443:443"
- "80:80"
volumes:
- ${ACTUAL_STORAGE_PATH}:/storage/
- ${ACTUAL_STATIC_PATH}:/static/
- .nginx/sec/validate.conf:/etc/nginx/snippets/sec-validate.conf # Allows you to specify custom hosts (e.g. mybooru.org, 192.168.1.42, etc.)
- .nginx/sec/ratelimit.conf:/etc/nginx/snippets/sec-ratelimit.conf # Ratelimit requests to the site
- .nginx/sec/apply-ratelimit.conf:/etc/nginx/snippets/sec-apply-ratelimit.conf # Enables SSL
- .nginx/conf/:/etc/nginx/conf.d/booru.conf # Allows for custom nginx config
# SSL/TLS Certificates (Uncomment if you want to use your own SSL/TLS certs)
# - ${SSL_KEY_PATH}:/certs/booru.key
# - ${SSL_CERT_PATH}:/certs/booru.crt
# - ${SSL_DH_PATH}:/certs/dhparam.pem
depends_on:
- web
redis:
image: redis
worker:
build: .
volumes:
- ${ACTUAL_STORAGE_PATH}:${BOORU_STORAGE_PATH}
command: "/app/.celery/worker.sh"
depends_on:
- db
- redis
- web
environment:
- CELERY_WORKER=True
# - DIRECTORY_SCAN_ENABLED
# Database
- POSTGRES_NAME=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
# Booru
- BOORU_STORAGE_PATH=/storage/
- BOORU_AUTOMATIC_RATING_ENABLED
# - SECRET_KEY
# - ROLL_SECRET
beat:
build: .
command: "/app/.celery/beat.sh"
depends_on:
- db
- redis
- web
environment:
- CELERY_BEAT=True
# - DIRECTORY_SCAN_ENABLED
# Database
- POSTGRES_NAME=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}