File tree 5 files changed +50
-52
lines changed
5 files changed +50
-52
lines changed Original file line number Diff line number Diff line change 2
2
# If you don't have your own domain (highly recommended)
3
3
# comment this out for first deployment, add your fly.dev domain here
4
4
# then reset your secrets and redeploy your app (untested)
5
- CADDY_DOMAIN = domain.name.com
5
+ DOMAIN_NAME = domain.name.com
6
6
7
7
# ##################
8
8
# E-mail settings #
Original file line number Diff line number Diff line change @@ -7,9 +7,7 @@ ARG SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.
7
7
8
8
ENV TZ="Asia/Shanghai" \
9
9
10
- CADDY_DOMAIN= \
11
- CADDY_PORT=80 \
12
- GOTIFY_SERVER_PORT=8080 \
10
+ DOMAIN_NAME= \
13
11
14
12
OVERMIND_CAN_DIE=caddy,crontab \
15
13
OVERMIND_PROCFILE=/Procfile \
@@ -29,8 +27,8 @@ ENV TZ="Asia/Shanghai" \
29
27
30
28
COPY config/crontab \
31
29
config/Procfile \
30
+ config/Caddyfile \
32
31
scripts/restic.sh \
33
- scripts/caddy.sh \
34
32
/
35
33
36
34
RUN apt update && apt install -y --no-install-recommends \
@@ -65,7 +63,6 @@ RUN apt update && apt install -y --no-install-recommends \
65
63
66
64
&& chmod +x /usr/local/bin/supercronic \
67
65
&& chmod +x /usr/local/bin/overmind \
68
- && chmod +x /restic.sh \
69
- && chmod +x /caddy.sh
66
+ && chmod +x /restic.sh
70
67
71
68
ENTRYPOINT ["overmind" , "start" ]
Original file line number Diff line number Diff line change
1
+ {
2
+ # HTTPS/TLS is handled by Fly or on your domain (eg: Cloudflare)
3
+ auto_https off
4
+ admin off
5
+ persist_config off
6
+
7
+ log {
8
+ output stdout
9
+ format console
10
+ }
11
+ }
12
+
13
+ {$DOMAIN_NAME} :80 {
14
+ encode zstd gzip
15
+
16
+ header / {
17
+ # Enable HTTP Strict Transport Security (HSTS)
18
+ Strict-Transport-Security "max-age=31536000;"
19
+ # Enable cross-site filter (XSS) and tell browser to block detected attacks
20
+ X-XSS-Protection "1; mode=block"
21
+ # Disallow the site to be rendered within a frame (clickjacking protection)
22
+ X-Frame-Options "DENY"
23
+ # Prevent search engines from indexing
24
+ X-Robots-Tag "noindex, nofollow"
25
+ # Disallow sniffing of X-Content-Type-Options
26
+ X-Content-Type-Options "nosniff"
27
+ # Server name removing
28
+ -Server
29
+ # Remove X-Powered-By though this shouldn't be an issue, better opsec to remove
30
+ -X-Powered-By
31
+ # Remove Last-Modified because etag is the same and is as effective
32
+ -Last-Modified
33
+ }
34
+
35
+ route /health {
36
+ respond "Hello, world!"
37
+ }
38
+
39
+ reverse_proxy localhost:8080 {
40
+ # Send the true remote IP to Rocket, so that vaultwarden can put this in the log
41
+ @cloudflare header Cf-Connecting-Ip *
42
+ header_up @cloudflare X-Real-IP {http.request.header.Cf-Connecting-Ip}
43
+ header_up !@cloudflare X-Real-IP {remote_host}
44
+ }
45
+ }
Original file line number Diff line number Diff line change 1
1
gotify : cd /app && ./gotify-app
2
- caddy : / caddy.sh
2
+ caddy : caddy run --config /Caddyfile
3
3
crontab : supercronic /crontab
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments