-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
148 lines (140 loc) · 3.94 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
##
## ---------------------------------
## | M A S T O D O N - D O C K E R |
## ---------------------------------
##
## Container based media tools configuration
##
## -- DO NOT EDIT THIS FILE --
##
## Configuration items for this file are taken from the .env file
##
## Have docker-compose.yml and .env in the same directory to launch the stack
version: '3'
######################
# SERVICES TO LAUNCH #
######################
services:
# ----------------------------------------
# MASTODON
# Decentralized Social Network
# ----------------------------------------
mastodon:
image: lscr.io/linuxserver/mastodon:latest
container_name: mastodon
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-file: '${LOG_FILE_NUM}'
max-size: '${LOG_FILE_SIZE}'
networks:
- web
- internal
ports:
- '8081:80'
- '4443:443'
environment:
- TZ=${TZ}
- PUID=${PUID}
- PGID=${PGID}
- LOCAL_DOMAIN=${LOCAL_DOMAIN}
- REDIS_HOST=redis_mastodon
- REDIS_PORT=6379
- DB_HOST=db_mastodon
- DB_USER=${MASTODON_DB_USER}
- DB_NAME=${MASTODON_DB_NAME}
- DB_PASS=${MASTODON_DB_PASS}
- DB_PORT=5432
- ES_ENABLED=false
- SECRET_KEY_BASE=${MASTODON_SECRET_KEY_BASE}
- OTP_SECRET=${MASTODON_OTP_SECRET}
- VAPID_PRIVATE_KEY=${MASTODON_VAPID_PRIVATE_KEY}
- VAPID_PUBLIC_KEY=${MASTONDON_VAPID_PUBLIC_KEY}
- ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=${ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY}
- ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=${ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT}
- ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=${ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY}
- SMTP_SERVER=${SMTP_SERVER}
- SMTP_PORT=${SMTP_PORT}
- SMTP_LOGIN=${SMTP_LOGIN}
- SMTP_PASSWORD=${SMTP_PASSWORD}
- SMTP_FROM_ADDRESS=${SMTP_FROM_ADDRESS}
- S3_ENABLED=false
- WEB_DOMAIN=${MASTODON_WEB_DOMAIN}
volumes:
- '${BASE_DOCKER_PATH}/mastodon:/config'
# --------------------------------------------
# POSTGRES
# PostgreSQL Relational Database for Mastodon
# --------------------------------------------
db_mastodon:
image: postgres:15-bullseye
container_name: db_mastodon
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-file: '${LOG_FILE_NUM}'
max-size: '${LOG_FILE_SIZE}'
networks:
- internal
expose:
- 5432
environment:
- TZ=${TZ}
- PUID=${PUID}
- PGID=${PGID}
- POSTGRES_USER=${MASTODON_DB_USER}
- POSTGRES_DB=${MASTODON_DB_NAME}
- POSTGRES_PASSWORD=${MASTODON_DB_PASS}
volumes:
- '${BASE_DOCKER_PATH}/postgres:/var/lib/postgresql/data'
# --------------------------------------------
# REDIS
# In-Memory data store for Mastodon
# --------------------------------------------
redis_mastodon:
image: redis
container_name: redis_mastodon
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-file: '${LOG_FILE_NUM}'
max-size: '${LOG_FILE_SIZE}'
networks:
- internal
expose:
- 6379
environment:
- TZ=${TZ}
- PUID=${PUID}
- PGID=${PGID}
volumes:
- '${BASE_DOCKER_PATH}/redis:/data'
command:
- redis-server
- --save 60 1
- --loglevel warning
# ----------------------------------------
# CLOUDFLARED
# Tunneling back to nas
# ----------------------------------------
cloudflared_mastodon:
image: cloudflare/cloudflared:latest
container_name: cloudflared_mastodon
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-file: '${LOG_FILE_NUM}'
max-size: '${LOG_FILE_SIZE}'
networks:
- web
command: tunnel --no-autoupdate run --token ${CLOUDFLARED_TOKEN}
########################
# GLOBAL CONFIGURATION #
########################
networks:
internal:
web: