4 # communication to web and clients
6 # communication between lemmy services
18 # actual and only port facing any connection from outside
22 - ./nginx.conf:/etc/nginx/nginx.conf:ro
29 # image: dessalines/lemmy:dev
30 # use this to build your local lemmy server image for development
31 # run docker compose up --build
34 dockerfile: docker/dev/Dockerfile
35 # this hostname is used in nginx reverse proxy and also for lemmy ui to connect to the backend, do not change
41 - RUST_LOG="warn,lemmy_server=debug,lemmy_api=debug,lemmy_api_common=debug,lemmy_api_crud=debug,lemmy_apub=debug,lemmy_db_schema=debug,lemmy_db_views=debug,lemmy_db_views_actor=debug,lemmy_db_views_moderator=debug,lemmy_routes=debug,lemmy_utils=debug,lemmy_websocket=debug"
44 - ./lemmy.hjson:/config/config.hjson
50 image: dessalines/lemmy-ui:dev
51 # use this to build your local lemmy ui image for development
52 # run docker compose up --build
53 # assuming lemmy-ui is cloned besides lemmy directory
55 # context: ../../../lemmy-ui
56 # dockerfile: dev.dockerfile
60 # this needs to match the hostname defined in the lemmy service
61 - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy:8536
62 # set the outside hostname here
63 - LEMMY_UI_LEMMY_EXTERNAL_HOST=localhost:1236
71 image: asonix/pictrs:0.3.1
72 # this needs to match the pictrs url in lemmy.hjson
74 # we can set options to pictrs like this, here we set max. image size and forced format for conversion
75 # entrypoint: /sbin/tini -- /usr/local/bin/pict-rs -p /mnt -m 4 --image-format webp
79 - PICTRS_OPENTELEMETRY_URL=http://otel:4137
80 - PICTRS__API_KEY=API_KEY
85 - ./volumes/pictrs:/mnt
89 image: postgres:15-alpine
90 # this needs to match the database host in lemmy.hson
91 # Tune your settings via
92 # https://pgtune.leopard.in.ua/#/
93 # You can use this technique to add them here
94 # https://stackoverflow.com/a/30850095/1655478
98 "-c", "session_preload_libraries=auto_explain",
99 "-c", "auto_explain.log_min_duration=5ms",
100 "-c", "auto_explain.log_analyze=true"
102 # "-c", "max_connections=200",
103 # "-c", "shared_buffers=3GB",
104 # "-c", "effective_cache_size=9GB",
105 # "-c", "maintenance_work_mem=768MB",
106 # "-c", "checkpoint_completion_target=0.9",
107 # "-c", "checkpoint_timeout=86400",
108 # "-c", "wal_buffers=16MB",
109 # "-c", "default_statistics_target=100",
110 # "-c", "random_page_cost=4",
111 # "-c", "effective_io_concurrency=2",
112 # "-c", "work_mem=4GB",
113 # "-c", "min_wal_size=1GB",
114 # "-c", "max_wal_size=30GB",
115 # "-c", "max_worker_processes=4",
116 # "-c", "max_parallel_workers_per_gather=2",
117 # "-c", "max_parallel_workers=4",
118 # "-c", "max_parallel_maintenance_workers=2"
122 # adding the external facing network to allow direct db access for devs
125 # use a different port so it doesnt conflict with potential postgres db running on the host
128 - POSTGRES_USER=lemmy
129 - POSTGRES_PASSWORD=password
132 - ./volumes/postgres:/var/lib/postgresql/data
136 image: otel/opentelemetry-collector:latest
137 command: --config otel-local-config.yaml
146 target: /otel-local-config.yaml
147 restart: unless-stopped
152 image: jaegertracing/all-in-one:1
158 # To view traces, visit http://localhost:16686
160 restart: unless-stopped