-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.yml
106 lines (106 loc) · 2.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
version: "3.9"
services:
postgres:
image: postgres:16-alpine
restart: always
command: postgres -c listen_addresses='*'
volumes:
- db:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER:-chatter}
POSTGRES_DB: ${POSTGRES_DB:-chatapp}
redis:
image: redis:6.2.11-alpine
restart: always
volumes:
- redis:/data
back :
image: nag763/tchatchers_back:latest
user: "${UID:-1000}:${GID:-1000}"
environment:
POSTGRES_HOST: ${POSTGRES_HOST:-pg.tchatche.rs}
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
POSTGRES_DB: ${POSTGRES_DB:-chatapp}
POSTGRES_USER: ${POSTGRES_USER:-chatter}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
REFRESH_TOKEN_SECRET: ${REFRESH_TOKEN_SECRET}
REDIS_HOST: ${REDIS_HOST:-redis.tchatche.rs}
REDIS_PORT: ${REDIS_PORT:-6379}
links:
- postgres:${POSTGRES_HOST:-pg.tchatche.rs}
- redis:${REDIS_HOST:-redis.tchatche.rs}
depends_on:
- postgres
- redis
build:
context: ./
dockerfile: Dockerfile_back
volumes:
- static:/home/usr/back/static
async :
image: nag763/tchatchers_async:latest
environment:
POSTGRES_HOST: ${POSTGRES_HOST:-pg.tchatche.rs}
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
POSTGRES_DB: ${POSTGRES_DB:-chatapp}
POSTGRES_USER: ${POSTGRES_USER:-chatter}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
REDIS_HOST: ${REDIS_HOST:-redis.tchatche.rs}
REDIS_PORT: ${REDIS_PORT:-6379}
links:
- postgres:${POSTGRES_HOST:-pg.tchatche.rs}
- redis:${REDIS_HOST:-redis.tchatche.rs}
depends_on:
- postgres
- redis
build:
context: ./
dockerfile: Dockerfile_async
volumes:
- static:/home/usr/async/static
doc:
image: nag763/tchatchers_doc:latest
build:
context: ./
dockerfile: Dockerfile_doc
front :
image: nag763/tchatchers_front:latest
volumes:
- ${SSL_CERTIFICATE_PATH:-/dev/null}:/usr/nginx/home/certs/cert.crt:ro
- ${SSL_CERTIFICATE_KEY:-/dev/null}:/usr/nginx/home/certs/key.pem:ro
- ${SSL_DHPARAM_PATH:-/dev/null}:/usr/nginx/home/certs/ssl-dhparams.pem:ro
- static:/usr/share/nginx/static
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- back
- doc
links:
- back:back.tchatche.rs
- doc:doc.tchatche.rs
build:
context: ./
dockerfile: Dockerfile_front
ports:
- "80:80"
- "443:443"
cli :
image: nag763/tchatchers_tct:latest
command: ["--docker-service"]
volumes:
- static:/home/usr/tct/static
- .env:/home/usr/tct/.env
links:
- postgres:${POSTGRES_HOST:-pg.tchatche.rs}
- redis:${REDIS_HOST:-redis.tchatche.rs}
depends_on:
- postgres
- redis
build:
context: ./
dockerfile: Dockerfile_tct
volumes:
db:
static:
redis: