]> Untitled Git - lemmy.git/blob - docker/federation/docker-compose.yml
Docker yaml anchors and docker logs (#3027)
[lemmy.git] / docker / federation / docker-compose.yml
1 version: "3.3"
2
3 x-ui-default: &ui-default
4   image: dessalines/lemmy-ui:0.17.3
5   # assuming lemmy-ui is cloned besides lemmy directory
6   # build:
7   #     context: ../../../lemmy-ui
8   #     dockerfile: dev.dockerfile
9   environment:
10     - LEMMY_UI_HTTPS=false
11
12 x-lemmy-default: &lemmy-default
13   image: lemmy-federation:latest
14   environment:
15     - RUST_BACKTRACE=1
16     - 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"
17   restart: always
18
19 x-postgres-default: &postgres-default
20   image: postgres:15-alpine
21   environment:
22     - POSTGRES_USER=lemmy
23     - POSTGRES_PASSWORD=password
24     - POSTGRES_DB=lemmy
25   restart: always
26
27 services:
28   nginx:
29     image: nginx:1-alpine
30     ports:
31       - "8540:8540"
32       - "8550:8550"
33       - "8560:8560"
34       - "8570:8570"
35       - "8580:8580"
36     volumes:
37       - ./nginx.conf:/etc/nginx/nginx.conf:Z
38     restart: always
39     depends_on:
40       - pictrs
41       - lemmy-alpha-ui
42       - lemmy-beta-ui
43       - lemmy-gamma-ui
44       - lemmy-delta-ui
45       - lemmy-epsilon-ui
46
47   pictrs:
48     restart: always
49     image: asonix/pictrs:0.4.0-beta.19
50     user: 991:991
51     volumes:
52       - ./volumes/pictrs_alpha:/mnt:Z
53
54   lemmy-alpha-ui:
55     <<: *ui-default
56     environment:
57       - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy-alpha:8541
58       - LEMMY_UI_LEMMY_EXTERNAL_HOST=localhost:8541
59     depends_on:
60       - lemmy-alpha
61   lemmy-alpha:
62     <<: *lemmy-default
63     volumes:
64       - ./lemmy_alpha.hjson:/config/config.hjson:Z
65     depends_on:
66       - postgres_alpha
67     ports:
68       - "8541:8541"
69   postgres_alpha:
70     <<: *postgres-default
71     volumes:
72       - ./volumes/postgres_alpha:/var/lib/postgresql/data:Z
73
74   lemmy-beta-ui:
75     <<: *ui-default
76     environment:
77       - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy-beta:8551
78       - LEMMY_UI_LEMMY_EXTERNAL_HOST=localhost:8551
79     depends_on:
80       - lemmy-beta
81   lemmy-beta:
82     <<: *lemmy-default
83     volumes:
84       - ./lemmy_beta.hjson:/config/config.hjson:Z
85     depends_on:
86       - postgres_beta
87     ports:
88       - "8551:8551"
89   postgres_beta:
90     <<: *postgres-default
91     volumes:
92       - ./volumes/postgres_beta:/var/lib/postgresql/data:Z
93
94   lemmy-gamma-ui:
95     <<: *ui-default
96     environment:
97       - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy-gamma:8561
98       - LEMMY_UI_LEMMY_EXTERNAL_HOST=localhost:8561
99     depends_on:
100       - lemmy-gamma
101   lemmy-gamma:
102     <<: *lemmy-default
103     volumes:
104       - ./lemmy_gamma.hjson:/config/config.hjson:Z
105     depends_on:
106       - postgres_gamma
107     ports:
108       - "8561:8561"
109   postgres_gamma:
110     <<: *postgres-default
111     volumes:
112       - ./volumes/postgres_gamma:/var/lib/postgresql/data:Z
113
114   # An instance with only an allowlist for beta
115   lemmy-delta-ui:
116     <<: *ui-default
117     environment:
118       - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy-delta:8571
119       - LEMMY_UI_LEMMY_EXTERNAL_HOST=localhost:8571
120     depends_on:
121       - lemmy-delta
122   lemmy-delta:
123     <<: *lemmy-default
124     volumes:
125       - ./lemmy_delta.hjson:/config/config.hjson:Z
126     depends_on:
127       - postgres_delta
128     ports:
129       - "8571:8571"
130   postgres_delta:
131     <<: *postgres-default
132     volumes:
133       - ./volumes/postgres_delta:/var/lib/postgresql/data:Z
134
135   # An instance who has a blocklist, with lemmy-alpha blocked
136   lemmy-epsilon-ui:
137     <<: *ui-default
138     environment:
139       - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy-epsilon:8581
140       - LEMMY_UI_LEMMY_EXTERNAL_HOST=localhost:8581
141     depends_on:
142       - lemmy-epsilon
143   lemmy-epsilon:
144     <<: *lemmy-default
145     volumes:
146       - ./lemmy_epsilon.hjson:/config/config.hjson:Z
147     depends_on:
148       - postgres_epsilon
149     ports:
150       - "8581:8581"
151   postgres_epsilon:
152     <<: *postgres-default
153     volumes:
154       - ./volumes/postgres_epsilon:/var/lib/postgresql/data:Z