]> Untitled Git - lemmy.git/blob - docker/prod/docker-compose.yml
Fix invalid config in docker/prod (fixes #2520) (#2524)
[lemmy.git] / docker / prod / docker-compose.yml
1 version: "3.3"
2
3 networks:
4   # communication to web and clients
5   lemmyexternalproxy:
6   # communication between lemmy services
7   lemmyinternal:
8     driver: bridge
9     internal: true
10
11 services:
12   proxy:
13     image: nginx:1-alpine
14     networks:
15       - lemmyinternal
16       - lemmyexternalproxy
17     ports:
18       # only ports facing any connection from outside
19       - 80:80 
20       - 443:443
21     volumes:
22       - ./nginx.conf:/etc/nginx/nginx.conf:ro
23       # setup your certbot and letsencrypt config 
24       - ./certbot:/var/www/certbot
25       - ./letsencrypt:/etc/letsencrypt/live
26     restart: always
27     depends_on:
28       - pictrs
29       - lemmy-ui
30
31   lemmy:
32     image: dessalines/lemmy:0.16.7
33     hostname: lemmy
34     networks:
35       - lemmyinternal
36     restart: always
37     environment:
38       - RUST_LOG="warn,lemmy_server=info,lemmy_api=info,lemmy_api_common=info,lemmy_api_crud=info,lemmy_apub=info,lemmy_db_schema=info,lemmy_db_views=info,lemmy_db_views_actor=info,lemmy_db_views_moderator=info,lemmy_routes=info,lemmy_utils=info,lemmy_websocket=info"
39     volumes:
40       - ./lemmy.hjson:/config/config.hjson
41     depends_on:
42       - postgres
43       - pictrs
44
45   lemmy-ui:
46     image: dessalines/lemmy-ui:0.16.7
47     networks:
48       - lemmyinternal
49     environment:
50       # this needs to match the hostname defined in the lemmy service
51       - LEMMY_INTERNAL_HOST=lemmy:8536
52       # set the outside hostname here
53       - LEMMY_EXTERNAL_HOST=localhost:1236
54       - LEMMY_HTTPS=true
55     depends_on:
56       - lemmy
57     restart: always
58
59   pictrs:
60     image: asonix/pictrs:0.3.1
61     # this needs to match the pictrs url in lemmy.hjson
62     hostname: pictrs
63     # we can set options to pictrs like this, here we set max. image size and forced format for conversion
64     # entrypoint: /sbin/tini -- /usr/local/bin/pict-rs -p /mnt -m 4 --image-format webp
65     networks:
66       - lemmyinternal
67     environment:
68       - PICTRS__API_KEY=API_KEY
69     user: 991:991
70     volumes:
71       - ./volumes/pictrs:/mnt
72     restart: always
73
74   postgres:
75     image: postgres:14-alpine
76     # this needs to match the database host in lemmy.hson
77     hostname: postgres
78     networks:
79       - lemmyinternal
80     environment:
81       - POSTGRES_USER=lemmy
82       - POSTGRES_PASSWORD=password
83       - POSTGRES_DB=lemmy
84     volumes:
85       - ./volumes/postgres:/var/lib/postgresql/data
86     restart: always