forked from vijeeshr/quickretro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.reverseproxy.yml
More file actions
101 lines (92 loc) · 3.17 KB
/
compose.reverseproxy.yml
File metadata and controls
101 lines (92 loc) · 3.17 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
# With reverse-proxy. Access only with https://localhost.
# Cold start
# docker compose -f compose.reverseproxy.yml up
# To force a rebuild without cache:
# docker compose -f compose.reverseproxy.yml build --no-cache
# docker compose -f compose.reverseproxy.yml up
# Restart services.
# Containers are NOT deleted, just STOPPED and STARTED. No data is lost.
# Use case: ENV variable update.
# docker compose -f compose.reverseproxy.yml stop
# docker compose -f compose.reverseproxy.yml start
# Deletes containers and networks, then create them back from already built/pulled images.
# Volumes and images are retained, so data in volumes is not lost.
# Use case: if the previous "Restart services" steps are inadequate.
# docker compose -f compose.reverseproxy.yml down
# docker compose -f compose.reverseproxy.yml up
# Hard reset: removes containers, networks, volumes, and images.
# ALL data stored in volumes will be lost (including Redis data).
# Use case: code changes, new images, or if previous steps are inadequate.
# docker compose -f compose.reverseproxy.yml down --rmi "all" --volumes
# docker compose -f compose.reverseproxy.yml up
services:
redis:
image: "redis:8.0.1-alpine"
############## Redis ACL ##############
# volumes:
# - ./redis/users.acl:/usr/local/etc/redis/users.acl
# command: redis-server --aclfile /usr/local/etc/redis/users.acl
# # command: ["redis-server", "--aclfile", "/usr/local/etc/redis/users.acl"]
############## Redis ACL ##############
restart: always
networks:
- redisnet
# ports:
# - "6379:6379"
expose:
- 6379
volumes:
- redis_data:/data
app:
build:
context: .
dockerfile: build.Dockerfile
restart: unless-stopped
depends_on:
- redis
environment:
# Load from .env file in same directory as the compose file.
# To create file, in CLI: echo "REDIS_CONNSTR=redis://redis:6379/0" > .env
# DO NOT create file from Windows. It creates Unicode text, UTF-16, little-endian text, with CRLF line terminators.
- REDIS_CONNSTR=${REDIS_CONNSTR}
# Default Redis (No Auth or ACL). Outside docker - redis://localhost:6379/0
# - REDIS_CONNSTR=redis://redis:6379/0
# Using Redis ACL with Username & Password. Outside docker - redis://app-user:mysecretpassword@localhost:6379/0
# - REDIS_CONNSTR=redis://app-user:mysecretpassword@redis:6379/0
- TURNSTILE_ENABLED=${TURNSTILE_ENABLED}
- TURNSTILE_SITE_KEY=${TURNSTILE_SITE_KEY}
- TURNSTILE_SECRET_KEY=${TURNSTILE_SECRET_KEY}
networks:
- redisnet
- proxynet
# ports:
# - "8080:8080"
expose:
- 8080
caddy:
image: caddy:2.10.0-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
depends_on:
- app
networks:
- proxynet
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./homepage:/var/www/homepage
- ./site:/srv
- caddy_data:/data
- caddy_config:/config
volumes:
redis_data:
caddy_data:
caddy_config:
networks:
redisnet:
name: redisnet
proxynet:
name: proxynet
# external: true