ports:
# actual and only port facing any connection from outside
- "1236:1236"
+ - "8536:8536"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
restart: always
- lemmy-ui
lemmy:
- image: dessalines/lemmy:dev
+ # image: dessalines/lemmy:dev
# use this to build your local lemmy server image for development
# run docker compose up --build
- # build:
- # context: ../..
- # dockerfile: docker/dev/Dockerfile
+ build:
+ context: ../..
+ dockerfile: docker/dev/Dockerfile
# this hostname is used in nginx reverse proxy and also for lemmy ui to connect to the backend, do not change
hostname: lemmy
networks:
# assuming lemmy-ui is cloned besides lemmy directory
# build:
# context: ../../../lemmy-ui
- # dockerfile: Dockerfile
+ # dockerfile: dev.dockerfile
networks:
- lemmyinternal
environment:
restart: always
postgres:
- image: postgres:14-alpine
+ image: postgres:15-alpine
# this needs to match the database host in lemmy.hson
+ # Tune your settings via
+ # https://pgtune.leopard.in.ua/#/
+ # You can use this technique to add them here
+ # https://stackoverflow.com/a/30850095/1655478
hostname: postgres
- command: ["postgres", "-c", "session_preload_libraries=auto_explain", "-c", "auto_explain.log_min_duration=5ms", "-c", "auto_explain.log_analyze=true"]
+ command: [
+ "postgres",
+ "-c", "session_preload_libraries=auto_explain",
+ "-c", "auto_explain.log_min_duration=5ms",
+ "-c", "auto_explain.log_analyze=true"
+ # Tuning config
+ # "-c", "max_connections=200",
+ # "-c", "shared_buffers=3GB",
+ # "-c", "effective_cache_size=9GB",
+ # "-c", "maintenance_work_mem=768MB",
+ # "-c", "checkpoint_completion_target=0.9",
+ # "-c", "checkpoint_timeout=86400",
+ # "-c", "wal_buffers=16MB",
+ # "-c", "default_statistics_target=100",
+ # "-c", "random_page_cost=4",
+ # "-c", "effective_io_concurrency=2",
+ # "-c", "work_mem=4GB",
+ # "-c", "min_wal_size=1GB",
+ # "-c", "max_wal_size=30GB",
+ # "-c", "max_worker_processes=4",
+ # "-c", "max_parallel_workers_per_gather=2",
+ # "-c", "max_parallel_workers=4",
+ # "-c", "max_parallel_maintenance_workers=2"
+ ]
networks:
- lemmyinternal
# adding the external facing network to allow direct db access for devs