-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
105 lines (98 loc) · 2.91 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
version: "3.7"
x-logging: &default-logging
driver: "json-file"
options:
max-size: "50m"
max-file: "4"
services:
lemmytor:
build:
context: ./lemmytor/
dockerfile: Dockerfile
hostname: lemmytor
volumes:
- ./volumes/lemmytor:/var/lib/tor/hidden_lemmy_service
depends_on:
- proxy
restart: always
logging: *default-logging
proxy:
image: docker.io/library/nginx
volumes:
- ./nginx_internal.conf:/etc/nginx/nginx.conf:ro,Z
- ./proxy_params:/etc/nginx/proxy_params:ro,Z
# - ./nginx.conf:/etc/nginx/sites-available/${domain}.conf:ro,Z
restart: always
logging: *default-logging
depends_on:
- pictrs
- lemmy-ui
lemmy:
image: docker.io/dessalines/lemmy:0.19.0
hostname: lemmy
restart: always
logging: *default-logging
environment:
- RUST_LOG="warn"
volumes:
- ./lemmy.hjson:/config/config.hjson:Z
depends_on:
- postgres
- pictrs
lemmy-ui:
image: docker.io/dessalines/lemmy-ui:0.19.0
environment:
- LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy:8536
- LEMMY_UI_LEMMY_EXTERNAL_HOST=${domain}
- LEMMY_UI_HTTPS=false
volumes:
- ./volumes/lemmy-ui/extra_themes:/app/extra_themes
depends_on:
- lemmy
restart: always
logging: *default-logging
pictrs:
image: docker.io/asonix/pictrs:0.4.3
# this needs to match the pictrs url in lemmy.hjson
hostname: pictrs
# we can set options to pictrs like this, here we set max. image size and forced format for conversion
# entrypoint: /sbin/tini -- /usr/local/bin/pict-rs -p /mnt -m 4 --image-format webp
environment:
- PICTRS__SERVER__API_KEY=${postgres_password}
- PICTRS__MEDIA__VIDEO_CODEC=vp9
- PICTRS__MEDIA__GIF__MAX_WIDTH=256
- PICTRS__MEDIA__GIF__MAX_HEIGHT=256
- PICTRS__MEDIA__GIF__MAX_AREA=65536
- PICTRS__MEDIA__GIF__MAX_FRAME_COUNT=400
- RUST_LOG=debug
- RUST_BACKTRACE=full
# - PICTRS_OPENTELEMETRY_URL=http://otel:4137
# - PICTRS__STORE__TYPE=object_storage
# - PICTRS__STORE__ENDPOINT='<S3 endpoint>'
# - PICTRS__STORE__BUCKET_NAME='<bucket name>'
# - PICTRS__STORE__REGION='<region>'
# - PICTRS__STORE__USE_PATH_STYLE=false
# - PICTRS__STORE__ACCESS_KEY='<access key>'
# - PICTRS__STORE__SECRET_KEY='<secret key>'
user: 991:991
volumes:
- ./volumes/pictrs:/mnt:Z
restart: always
logging: *default-logging
deploy:
resources:
limits:
memory: 690m
postgres:
image: docker.io/postgres:15-alpine
hostname: postgres
environment:
- POSTGRES_USER=lemmy
- POSTGRES_PASSWORD=${postgres_password}
- POSTGRES_DB=lemmy
volumes:
- ./volumes/postgres:/var/lib/postgresql/data:Z
- ./customPostgresql.conf:/etc/postgresql.conf
restart: always
command: postgres -c config_file=/etc/postgresql.conf
logging: *default-logging