]> Untitled Git - lemmy.git/blob - docker/dev/docker-compose.yml
Add postgres auto-explain for dev testing. (#2399)
[lemmy.git] / docker / dev / docker-compose.yml
1 version: '3.3'
2
3 services:
4   nginx:
5     image: nginx:1-alpine
6     ports:
7       - "1236:1236"
8     volumes:
9       - ./nginx.conf:/etc/nginx/nginx.conf
10     restart: always
11     depends_on:
12       - pictrs
13       - lemmy-ui
14
15   lemmy:
16     image: lemmy-dev:latest
17     ports:
18       - "8536:8536"
19       - "6669:6669"
20     restart: always
21     environment:
22       - 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"
23     volumes:
24       - ../lemmy.hjson:/config/config.hjson
25     depends_on: 
26       - pictrs
27       - postgres
28       - otel
29
30   lemmy-ui:
31     image: dessalines/lemmy-ui:0.16.5
32     restart: always
33     environment:
34       - LEMMY_INTERNAL_HOST=lemmy:8536
35       - LEMMY_EXTERNAL_HOST=localhost:1234
36       - LEMMY_HTTPS=false
37       - LEMMY_UI_DEBUG=true
38     depends_on: 
39       - lemmy
40
41   postgres:
42     image: postgres:14-alpine
43     ports:
44       # use a different port so it doesnt conflict with postgres running on the host
45       - "5433:5432"
46     environment:
47       - POSTGRES_USER=lemmy
48       - POSTGRES_PASSWORD=password
49       - POSTGRES_DB=lemmy
50     volumes:
51       - ./volumes/postgres:/var/lib/postgresql/data
52     restart: always
53     command: ["postgres", "-c", "session_preload_libraries=auto_explain", "-c", "auto_explain.log_min_duration=5ms", "-c", "auto_explain.log_analyze=true"]
54
55   pictrs:
56     image: asonix/pictrs:0.3.1
57     user: 991:991
58     environment:
59       - PICTRS_OPENTELEMETRY_URL=http://otel:4137
60       - PICTRS__API_KEY=API_KEY
61     ports:
62       - "6670:6669"
63       - "8080:8080"
64     volumes:
65       - ./volumes/pictrs:/mnt
66     restart: always
67     depends_on:
68       - otel
69
70   otel:
71     image: otel/opentelemetry-collector:latest
72     command: --config otel-local-config.yaml
73     ports:
74       - "4317:4317"
75     volumes:
76       - type: bind
77         source: ./otel.yml
78         target: /otel-local-config.yaml
79     restart: always
80     depends_on:
81       - jaeger
82
83   jaeger:
84     image: jaegertracing/all-in-one:1
85     ports:
86       - "14250:14250"
87       # To view traces, visit http://localhost:16686
88       - "16686:16686"
89     restart: always