Advertisement
Guest User

Untitled

a guest
May 15th, 2024
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.77 KB | Cybersecurity | 0 0
  1. x-logging: &default-logging
  2. driver: "json-file"
  3. options:
  4. max-size: "50m"
  5. max-file: "4"
  6.  
  7. services:
  8. cloudflared:
  9. image: cloudflare/cloudflared:latest
  10. container_name: cloudflare_lemmy
  11. restart: unless-stopped
  12. command: tunnel --no-autoupdate run --token token
  13.  
  14. proxy:
  15. image: nginx:1-alpine
  16. ports:
  17. # actual and only port facing any connection from outside
  18. # Note, change the left number if port 1236 is already in use on your system
  19. # You could use port 80 if you won't use a reverse proxy
  20. - "4236:1236"
  21. - "8536:8536"
  22. volumes:
  23. - ./nginx.conf:/etc/nginx/nginx.conf:ro,Z
  24. restart: unless-stopped
  25. depends_on:
  26. - pictrs
  27. - lemmy-ui
  28. logging: *default-logging
  29.  
  30. lemmy:
  31. # use "image" to pull down an already compiled lemmy. make sure to comment out "build".
  32. image: dessalines/lemmy:0.19.3
  33. platform: linux/x86_64 # no arm64 support. uncomment platform if using m1.
  34. # use "build" to build your local lemmy server image for development. make sure to comment out "image".
  35. # run: docker compose up --build
  36.  
  37. #build:
  38. #context: ../
  39. #dockerfile: docker/Dockerfile
  40. # args:
  41. # RUST_RELEASE_MODE: release
  42. # CARGO_BUILD_FEATURES: default
  43. # this hostname is used in nginx reverse proxy and also for lemmy ui to connect to the backend, do not change
  44. hostname: lemmy
  45. restart: unless-stopped
  46. environment:
  47. - 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"
  48. - RUST_BACKTRACE=full
  49. ports:
  50. # prometheus metrics can be enabled with the `prometheus` config option. they are available on
  51. # port 10002, path /metrics by default
  52. - "10002:10002"
  53. volumes:
  54. - ./lemmy.hjson:/config/config.hjson:Z
  55. depends_on:
  56. - postgres
  57. - pictrs
  58. logging: *default-logging
  59.  
  60. lemmy-ui:
  61. # use "image" to pull down an already compiled lemmy-ui. make sure to comment out "build".
  62. image: dessalines/lemmy-ui:0.19.3
  63. # platform: linux/x86_64 # no arm64 support. uncomment platform if using m1.
  64. # use "build" to build your local lemmy ui image for development. make sure to comment out "image".
  65. # run: docker compose up --build
  66.  
  67. # build:
  68. # context: ../../lemmy-ui # assuming lemmy-ui is cloned besides lemmy directory
  69. # dockerfile: dev.dockerfile
  70. environment:
  71. # this needs to match the hostname defined in the lemmy service
  72. - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy:8536
  73. # set the outside hostname here
  74. - LEMMY_UI_LEMMY_EXTERNAL_HOST=localhost:1236
  75. - LEMMY_UI_HTTPS=false
  76. - LEMMY_UI_DEBUG=true
  77. depends_on:
  78. - lemmy
  79. restart: unless-stopped
  80. logging: *default-logging
  81. init: true
  82.  
  83. pictrs:
  84. image: asonix/pictrs:0.5.0-rc.2
  85. # this needs to match the pictrs url in lemmy.hjson
  86. hostname: pictrs
  87. # we can set options to pictrs like this, here we set max. image size and forced format for conversion
  88. # entrypoint: /sbin/tini -- /usr/local/bin/pict-rs -p /mnt -m 4 --image-format webp
  89. environment:
  90. - PICTRS_OPENTELEMETRY_URL=http://otel:4137
  91. - PICTRS__API_KEY=key
  92. - RUST_LOG=debug
  93. - RUST_BACKTRACE=full
  94. - PICTRS__MEDIA__VIDEO_CODEC=vp9
  95. - PICTRS__MEDIA__GIF__MAX_WIDTH=256
  96. - PICTRS__MEDIA__GIF__MAX_HEIGHT=256
  97. - PICTRS__MEDIA__GIF__MAX_AREA=65536
  98. - PICTRS__MEDIA__GIF__MAX_FRAME_COUNT=400
  99. user: 991:991
  100. volumes:
  101. - ./volumes/pictrs:/mnt:Z
  102. restart: unless-stopped
  103. logging: *default-logging
  104.  
  105. postgres:
  106. image: postgres:16-alpine
  107. # this needs to match the database host in lemmy.hson
  108. # Tune your settings via
  109. # https://pgtune.leopard.in.ua/#/
  110. # You can use this technique to add them here
  111. # https://stackoverflow.com/a/30850095/1655478
  112. hostname: postgres
  113. command:
  114. [
  115. "postgres",
  116. "-c",
  117. "session_preload_libraries=auto_explain",
  118. "-c",
  119. "auto_explain.log_min_duration=5ms",
  120. "-c",
  121. "auto_explain.log_analyze=true",
  122. "-c",
  123. "auto_explain.log_triggers=true",
  124. "-c",
  125. "track_activity_query_size=1048576",
  126. ]
  127. ports:
  128. # use a different port so it doesn't conflict with potential postgres db running on the host
  129. - "5433:5432"
  130. environment:
  131. - POSTGRES_USER=lemmy
  132. - POSTGRES_PASSWORD=pwd
  133. - POSTGRES_DB=lemmy
  134. volumes:
  135. - ./volumes/postgres:/var/lib/postgresql/data:Z
  136. restart: unless-stopped
  137. logging: *default-logging
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement