3 x-logging: &default-logging
10 # communication to web and clients
12 # communication between lemmy services
24 # actual and only port facing any connection from outside
25 # Note, change the left number if port 1236 is already in use on your system
26 # You could use port 80 if you won't use a reverse proxy
30 - ./nginx.conf:/etc/nginx/nginx.conf:ro,Z
35 logging: *default-logging
38 # image: dessalines/lemmy:dev
39 # use this to build your local lemmy server image for development
40 # run docker compose up --build
43 dockerfile: docker/Dockerfile
45 # RUST_RELEASE_MODE: release
46 # this hostname is used in nginx reverse proxy and also for lemmy ui to connect to the backend, do not change
53 - 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"
56 - ./lemmy.hjson:/config/config.hjson:Z
60 logging: *default-logging
63 image: dessalines/lemmy-ui:0.17.1
64 # use this to build your local lemmy ui image for development
65 # run docker compose up --build
66 # assuming lemmy-ui is cloned besides lemmy directory
68 # context: ../../lemmy-ui
69 # dockerfile: dev.dockerfile
73 # this needs to match the hostname defined in the lemmy service
74 - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy:8536
75 # set the outside hostname here
76 - LEMMY_UI_LEMMY_EXTERNAL_HOST=localhost:1236
82 logging: *default-logging
86 image: asonix/pictrs:0.4.0-beta.19
87 # this needs to match the pictrs url in lemmy.hjson
89 # we can set options to pictrs like this, here we set max. image size and forced format for conversion
90 # entrypoint: /sbin/tini -- /usr/local/bin/pict-rs -p /mnt -m 4 --image-format webp
94 - PICTRS_OPENTELEMETRY_URL=http://otel:4137
95 - PICTRS__API_KEY=API_KEY
98 - PICTRS__MEDIA__VIDEO_CODEC=vp9
99 - PICTRS__MEDIA__GIF__MAX_WIDTH=256
100 - PICTRS__MEDIA__GIF__MAX_HEIGHT=256
101 - PICTRS__MEDIA__GIF__MAX_AREA=65536
102 - PICTRS__MEDIA__GIF__MAX_FRAME_COUNT=400
105 - ./volumes/pictrs:/mnt:Z
107 logging: *default-logging
110 image: postgres:15-alpine
111 # this needs to match the database host in lemmy.hson
112 # Tune your settings via
113 # https://pgtune.leopard.in.ua/#/
114 # You can use this technique to add them here
115 # https://stackoverflow.com/a/30850095/1655478
121 "session_preload_libraries=auto_explain",
123 "auto_explain.log_min_duration=5ms",
125 "auto_explain.log_analyze=true",
127 "track_activity_query_size=1048576",
131 # adding the external facing network to allow direct db access for devs
134 # use a different port so it doesnt conflict with potential postgres db running on the host
137 - POSTGRES_USER=lemmy
138 - POSTGRES_PASSWORD=password
141 - ./volumes/postgres:/var/lib/postgresql/data:Z
143 logging: *default-logging