2022-10-10 16:06:52 +00:00
|
|
|
version: "3.3"
|
|
|
|
|
|
|
|
networks:
|
|
|
|
# communication to web and clients
|
|
|
|
lemmyexternalproxy:
|
|
|
|
# communication between lemmy services
|
|
|
|
lemmyinternal:
|
|
|
|
driver: bridge
|
|
|
|
internal: true
|
2022-03-19 16:21:07 +00:00
|
|
|
|
|
|
|
services:
|
2022-10-10 16:06:52 +00:00
|
|
|
proxy:
|
|
|
|
image: nginx:1-alpine
|
|
|
|
networks:
|
|
|
|
- lemmyinternal
|
|
|
|
- lemmyexternalproxy
|
|
|
|
ports:
|
|
|
|
# only ports facing any connection from outside
|
|
|
|
- 80:80
|
|
|
|
- 443:443
|
2022-03-19 16:21:07 +00:00
|
|
|
volumes:
|
2022-10-10 16:06:52 +00:00
|
|
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
|
|
# setup your certbot and letsencrypt config
|
|
|
|
- ./certbot:/var/www/certbot
|
|
|
|
- ./letsencrypt:/etc/letsencrypt/live
|
2022-03-19 16:21:07 +00:00
|
|
|
restart: always
|
2022-10-10 16:06:52 +00:00
|
|
|
depends_on:
|
|
|
|
- pictrs
|
|
|
|
- lemmy-ui
|
2022-03-19 16:21:07 +00:00
|
|
|
|
|
|
|
lemmy:
|
2022-10-10 16:06:52 +00:00
|
|
|
image: dessalines/lemmy:0.16.7
|
|
|
|
hostname: lemmy
|
|
|
|
networks:
|
|
|
|
- lemmyinternal
|
2022-03-19 16:21:07 +00:00
|
|
|
restart: always
|
2022-11-02 18:50:09 +00:00
|
|
|
environment:
|
2022-03-19 16:21:07 +00:00
|
|
|
- RUST_LOG="warn,lemmy_server=info,lemmy_api=info,lemmy_api_common=info,lemmy_api_crud=info,lemmy_apub=info,lemmy_db_schema=info,lemmy_db_views=info,lemmy_db_views_actor=info,lemmy_db_views_moderator=info,lemmy_routes=info,lemmy_utils=info,lemmy_websocket=info"
|
|
|
|
volumes:
|
|
|
|
- ./lemmy.hjson:/config/config.hjson
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
- pictrs
|
|
|
|
|
|
|
|
lemmy-ui:
|
2022-10-10 16:06:52 +00:00
|
|
|
image: dessalines/lemmy-ui:0.16.7
|
|
|
|
networks:
|
|
|
|
- lemmyinternal
|
2022-03-19 16:21:07 +00:00
|
|
|
environment:
|
2022-10-10 16:06:52 +00:00
|
|
|
# this needs to match the hostname defined in the lemmy service
|
2022-03-19 16:21:07 +00:00
|
|
|
- LEMMY_INTERNAL_HOST=lemmy:8536
|
2022-10-10 16:06:52 +00:00
|
|
|
# set the outside hostname here
|
|
|
|
- LEMMY_EXTERNAL_HOST=localhost:1236
|
2022-03-19 16:21:07 +00:00
|
|
|
- LEMMY_HTTPS=true
|
2022-10-10 16:06:52 +00:00
|
|
|
depends_on:
|
2022-03-19 16:21:07 +00:00
|
|
|
- lemmy
|
2022-10-10 16:06:52 +00:00
|
|
|
restart: always
|
2022-03-19 16:21:07 +00:00
|
|
|
|
|
|
|
pictrs:
|
2022-04-05 01:31:17 +00:00
|
|
|
image: asonix/pictrs:0.3.1
|
2022-10-10 16:06:52 +00:00
|
|
|
# this needs to match the pictrs url in lemmy.hjson
|
|
|
|
hostname: pictrs
|
|
|
|
# we can set options to pictrs like this, here we set max. image size and forced format for conversion
|
|
|
|
# entrypoint: /sbin/tini -- /usr/local/bin/pict-rs -p /mnt -m 4 --image-format webp
|
|
|
|
networks:
|
|
|
|
- lemmyinternal
|
|
|
|
environment:
|
|
|
|
- PICTRS__API_KEY=API_KEY
|
2022-03-19 16:21:07 +00:00
|
|
|
user: 991:991
|
|
|
|
volumes:
|
|
|
|
- ./volumes/pictrs:/mnt
|
|
|
|
restart: always
|
|
|
|
|
2022-10-10 16:06:52 +00:00
|
|
|
postgres:
|
|
|
|
image: postgres:14-alpine
|
|
|
|
# this needs to match the database host in lemmy.hson
|
|
|
|
hostname: postgres
|
|
|
|
networks:
|
|
|
|
- lemmyinternal
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=lemmy
|
|
|
|
- POSTGRES_PASSWORD=password
|
|
|
|
- POSTGRES_DB=lemmy
|
|
|
|
volumes:
|
|
|
|
- ./volumes/postgres:/var/lib/postgresql/data
|
|
|
|
restart: always
|