-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
129 lines (122 loc) · 3.9 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
version: '3.8'
services:
app:
image: archiveium/archiveium:0.0.26
restart: always
ports:
- 5292:3000
volumes:
- ./config.json:/app/config/production-0.json
environment:
TZ: 'America/Toronto' # Change timezone as needed
NODE_APP_INSTANCE: 0 # Do not change this
APP_ADMIN_EMAIL: <EMAIL> # Admin Email address
APP_ADMIN_PASSWORD: <PASSWORD> # Admin Password
APP_ENCRYPTION_KEY: <KEY> # Key used for encrypting email account passwords
# changing this key will invalidate all added accounts
# and they'll have to reauthorized again
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/login"]
interval: 30s
timeout: 5s
retries: 3
networks:
- archiveium
# Enable if running behind Traefik
# - traefik
depends_on:
- db
- redis
- minio
# Enable if running behind Traefik
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.archiveium.rule=Host(`URL_HERE`)"
# - "traefik.http.routers.archiveium.entrypoints=websecure"
# - "traefik.http.routers.archiveium.tls.certresolver=cloudflare"
# - "traefik.http.services.archiveium.loadbalancer.server.port=3000"
cron:
image: archiveium/archiveium:0.0.26
restart: always
volumes:
- ./config.json:/app/config/production-0.json
environment:
TZ: 'America/Toronto' # Change timezone as needed
NODE_APP_INSTANCE: 0
USE_AS_CRON_PROCESSOR: true # Needed to run container as cron job processor
APP_ENCRYPTION_KEY: <KEY> # Key used for encrypting email account passwords
# changing this key will invalidate all added accounts
# and they'll have to reauthorized again
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/login"]
interval: 30s
timeout: 5s
retries: 3
networks:
- archiveium
depends_on:
- app
- db
- minio
db:
image: postgres:13
restart: always
# ports:
# - 5432:5432
environment:
PGPASSWORD: "$DB_PASSWORD" # Should be the same as that of app
POSTGRES_DB: "$DB_DATABASE" # Should be the same as that of app
POSTGRES_USER: "$DB_USERNAME" # Should be the same as that of app
POSTGRES_PASSWORD: "$DB_PASSWORD" # Should be the same as that of app
volumes:
- db_data:/var/lib/postgresql/data
networks:
- archiveium
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}"]
retries: 3
timeout: 5s
minio:
image: 'minio/minio:RELEASE.2023-12-23T07-19-11Z'
restart: always
# ports:
# - 9000:9000
environment:
MINIO_ROOT_USER: '$MINIO_USER' # Should be the same as that of app
MINIO_ROOT_PASSWORD: '$MINIO_PASSWORD' # Should be the same as that of app
MINIO_COMPRESSION_ENABLE: 'on'
MINIO_COMPRESSION_EXTENSIONS: ''
MINIO_COMPRESSION_MIME_TYPES: ''
volumes:
- minio_data:/data/minio
networks:
- archiveium
entrypoint: sh
command: -c 'mkdir -p /data/minio/emails && minio server /data/minio'
healthcheck:
test: ["CMD", "mc", "ready", "local"]
retries: 3
timeout: 5s
redis:
image: 'redis:7.2.4-alpine'
restart: always
mem_limit: 256M
# ports:
# - '6379:6379'
command: redis-server --maxmemory-policy noeviction --appendonly yes --maxmemory 200M
volumes:
- redis_data:/data
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
retries: 3
networks:
- archiveium
volumes:
db_data:
minio_data:
redis_data:
networks:
archiveium:
# Enable if running behind Traefik
# traefik:
# external: true