]> Untitled Git - lemmy.git/blobdiff - docker/dev/docker-compose.yml
Speeding up comment-ltree migration, fixing index creation. Fixes #2664 (#2670)
[lemmy.git] / docker / dev / docker-compose.yml
index 399d79efcdd24737c8870b129baecf88c63a2073..639f798a0362f84f5c93bc4fdd0a132443042fad 100644 (file)
@@ -17,6 +17,7 @@ services:
     ports:
     # actual and only port facing any connection from outside 
       - "1236:1236"
+      - "8536:8536"
     volumes:
       - ./nginx.conf:/etc/nginx/nginx.conf:ro
     restart: always
@@ -25,12 +26,12 @@ services:
       - 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:
@@ -52,7 +53,7 @@ services:
     # assuming lemmy-ui is cloned besides lemmy directory
     # build: 
     #  context: ../../../lemmy-ui
-    #  dockerfile: Dockerfile  
+    #  dockerfile: dev.dockerfile
     networks:
       - lemmyinternal
     environment:
@@ -85,10 +86,37 @@ services:
     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