Skip to content

Commit

Permalink
feat: remove open port & enable docker live-restore (#249)
Browse files Browse the repository at this point in the history
* chore: cleanup

* feat: decouple lemmy-schedule and lemmy-federate

* fix: don't footgun everyone by allowing an open port

* feat: turn on live-restore 

Reference: https://docs.docker.com/config/containers/live-restore/

* Update docker-compose.yml

revert multi-container option & update inline documentation
  • Loading branch information
ticoombs authored Jul 15, 2024
1 parent f3e4c76 commit 363c09c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/vars.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
postgres_password: "{{ lookup('password', 'inventory/host_vars/{{ domain }}/passwords/postgres.psk chars=ascii_letters,digits') }}" # noqa yaml[line-length]:w
postgres_password: "{{ lookup('password', 'inventory/host_vars/{{ domain }}/passwords/postgres.psk chars=ascii_letters,digits') }}" # noqa yaml[line-length]

# Next two only relevant if pictrs_safety == True
pictrs_safety_worker_auth: "{{ lookup('password', 'inventory/host_vars/{{ domain }}/passwords/pictrs_safety_worker_auth.psk chars=ascii_letters,digits length=15') }}" # noqa yaml[line-length]
Expand Down
3 changes: 2 additions & 1 deletion files/docker-daemon.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"log-opts": {
"max-file": "10",
"max-size": "100m"
}
},
"live-restore": true
}
6 changes: 2 additions & 4 deletions templates/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ services:
proxy:
image: docker.io/library/nginx
ports:
# actual and only port facing any connection from outside
# Note, change the left number if port 1236 is already in use on your system
# You could use port 80 if you won't use a reverse proxy
- "{{ lemmy_port }}:8536"
# Note, change lemmy_port in vars.yml if it is already in use on your system
- "127.0.0.1:{{ lemmy_port }}:8536"
volumes:
- ./nginx_internal.conf:/etc/nginx/nginx.conf:ro,Z
- ./proxy_params:/etc/nginx/proxy_params:ro,Z
Expand Down

0 comments on commit 363c09c

Please sign in to comment.