-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
81 lines (80 loc) · 2.6 KB
/
docker-compose.yaml
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
version: "3.7"
volumes:
cloud_backend_postgres_pgdata:
external: false
cloud_backend_logs:
external: false
cloud_backend_storage:
external: false
cloud-front-build:
external: true
networks:
inbound:
name: inbound
external: true
services:
app:
image: sanarisan/cloud_backend_server:1
restart: unless-stopped
build:
context: ./
dockerfile: ./docker/app.Dockerfile
stop_signal: SIGINT
stop_grace_period: 60s
volumes:
- type: volume
source: cloud-front-build
target: /home/node/proj/cloud-front-build
- ./logs:/home/node/proj/logs
- ./storage:/home/node/proj/storage
networks:
- default
- inbound
depends_on:
- "${DB_HOST}"
env_file:
- .env
environment:
HOST: "${HOST}"
PORT: "${PORT}"
CORS_URL: "${CORS_URL}"
API_VERSION: "${API_VERSION}"
LOG_DIRECTORY: "${LOG_DIRECTORY}"
STORAGE_DIRECTORY: "${STORAGE_DIRECTORY}"
ACCESS_TOKEN_VALID_DAYS: "${ACCESS_TOKEN_VALID_DAYS}"
REFRESH_TOKEN_VALID_DAYS: "${REFRESH_TOKEN_VALID_DAYS}"
ISSUER: "${ISSUER}"
AUDIENCE: "${AUDIENCE}"
SECRET: "${SECRET}"
DB_HOST: "${DB_HOST}"
DB_PORT: "${DB_PORT}"
DB_USERNAME: "${DB_USERNAME}"
DB_PASSWORD: "${DB_PASSWORD}"
DB_DATABASE: "${DB_DATABASE}"
DROP_ON_RESTART: "${DROP_ON_RESTART}"
CONNECTION_LIFESPAN_SECS: "${CONNECTION_LIFESPAN_SECS}"
DEFAULT_STORAGE_SIZE_MB: "${DEFAULT_STORAGE_SIZE_MB}"
LIFETIME_DAYS_100_DEFAULT: "${LIFETIME_DAYS_100_DEFAULT}"
LIFETIME_DAYS_500_DEFAULT: "${LIFETIME_DAYS_500_DEFAULT}"
VIRTUAL_HOST: "${VIRTUAL_HOST}"
LETSENCRYPT_HOST: "${LETSENCRYPT_HOST}"
postgres:
container_name: "${DB_HOST}"
image: sanarisan/cloud_backend_postgres:1
restart: unless-stopped
build:
context: ./
dockerfile: ./docker/postgres.Dockerfile
shm_size: 512mb
shm_size: 512mb
environment:
POSTGRES_USER: "${DB_USERNAME}"
POSTGRES_PASSWORD: "${DB_PASSWORD}"
POSTGRES_DB: "${DB_DATABASE}"
NETWORK_ACCESS: "internal"
networks:
- default
volumes:
- cloud_backend_postgres_pgdata:/var/lib/postgresql/data
expose:
- "${DB_PORT}"