-
-
Notifications
You must be signed in to change notification settings - Fork 110
/
Copy pathdocker-compose.yml
102 lines (96 loc) · 2.66 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
services:
api:
container_name: karrio.api
image: karrio/server:$KARRIO_TAG
restart: unless-stopped
ports:
- ${KARRIO_HTTP_PORT}:${KARRIO_HTTP_PORT}
depends_on:
- db
- redis
environment:
DEBUG_MODE: "True"
DETACHED_WORKER: "True"
SECRET_KEY: ${SECRET_KEY}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
DATABASE_HOST: ${DATABASE_HOST}
DATABASE_PORT: ${DATABASE_PORT}
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_ENGINE: ${DATABASE_ENGINE}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
KARRIO_HTTP_PORT: ${KARRIO_HTTP_PORT}
healthcheck:
test: curl --fail http://api:5002/ || exit 1
interval: 40s
timeout: 30s
retries: 5
start_period: 60s
worker:
container_name: karrio.worker
image: karrio/server:$KARRIO_TAG
restart: unless-stopped
depends_on:
- db
- redis
- api
environment:
DEBUG_MODE: "True"
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
DATABASE_HOST: ${DATABASE_HOST}
DATABASE_PORT: ${DATABASE_PORT}
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_ENGINE: ${DATABASE_ENGINE}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
command: "/bin/bash ./worker"
dashboard:
container_name: karrio.dashboard
image: karrio/dashboard:$KARRIO_TAG
restart: unless-stopped
ports:
- ${DASHBOARD_PORT}:3000/tcp
depends_on:
api:
condition: service_healthy
restart: true
environment:
KARRIO_URL: http://api:${KARRIO_HTTP_PORT:-5002}
NEXTAUTH_SECRET: ${JWT_SECRET}
NEXT_PUBLIC_DASHBOARD_URL: ${DASHBOARD_URL}
NEXT_PUBLIC_KARRIO_PUBLIC_URL: ${KARRIO_PUBLIC_URL}
maildev:
container_name: karrio.mail
image: maildev/maildev
restart: on-failure
ports:
- "1080:1080"
- "1025:1025"
# Comment out everything below this point if you are using an external database and redis instance.
db:
container_name: karrio.db
image: postgres
restart: unless-stopped
ports:
- ${DATABASE_PORT}:5432
environment:
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
PGDATA: /var/lib/postgresql/data/karrio
volumes:
- postgres-data:/var/lib/postgresql/data
redis:
container_name: karrio.redis
image: redis
restart: unless-stopped
ports:
- ${REDIS_PORT}:6379
# command: redis-server --requirepass ${REDIS_PASSWORD}
volumes:
- redis-data:/data
volumes:
postgres-data:
redis-data: