-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
112 lines (104 loc) · 2.91 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
# --------------------------------------------------------------------------------------------------
# DEVELOPMENT docker-compose.
# --------------------------------------------------------------------------------------------------
version: "3.9"
networks:
default:
secrets:
jwt_token:
file: ./secrets/jwt_token
services:
# ---------------------- Node web app ---------------------- #
node:
container_name: "ethicapp-node"
build:
context: ethicapp/
args:
NODE_VERSION: ${NODE_VERSION}
secrets:
- jwt_token
environment:
NODE_ENV: development
NODE_PORT: ${NODE_PORT}
ETHICAPP_DOMAIN_NAME: ${ETHICAPP_DOMAIN_NAME}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS}
REDIS_HOST: RedisContainer
restart: "no"
networks:
default:
ports:
- "${NODE_PORT}:${NODE_PORT}"
volumes:
- "./ethicapp:/home/app:rw"
depends_on:
- RedisContainer
- postgres
# ---------------------- Admin Panel ---------------------- #
admin-panel:
container_name: "ethicapp-admin-panel"
build:
context: admin-panel/
args:
REACT_APP_API_PORT: ${NODE_PORT}
REACT_APP_DOMAIN: ${ETHICAPP_DOMAIN_NAME}
ports:
- "3000:3000"
networks:
default:
depends_on:
- node
- RedisContainer
# ---------------------- Redis Cache Server ---------------------- #
RedisContainer:
image: redis
container_name: ethicapp-redis
ports:
- "6379:6379"
# ---------------------- Database ---------------------- #
postgres:
container_name: "ethicapp-postgres"
build:
context: postgres-db/
args:
UBUNTU_VERSION: "22.04"
POSTGRES_VERSION: ${POSTGRES_VERSION}
DB_NAME: ${DB_NAME}
DB_USER_NAME: ${DB_USER_NAME}
DB_USER_PASSWORD: ${DB_USER_PASSWORD}
environment:
POSTGRES_LOG_LEVEL: 1
PGPORT: 5432
PGDATA: /var/lib/postgresql/${POSTGRES_VERSION}/main
restart: unless-stopped
networks:
default:
healthcheck:
test: ["CMD-SHELL", "su healthcheckuser -c pg_isready"]
interval: 20s
timeout: 5s
retries: 1
start_period: 10s
#* Do not modify this volume declaration, as the automated initialization of the volume mount
#* will break if not updated as well
volumes:
- "${HOST_DB_VOLUME_PATH}:/var/lib/postgresql/${POSTGRES_VERSION}/main:rw"
# ---------------------- PGAdmin ---------------------- #
pgadmin:
container_name: "ethicapp-pgadmin"
build:
context: pgadmin/
args:
PGADMIN_VERSION: ${PGADMIN_VERSION}
POSTGRES_CONN_PORT: 5432
POSTGRES_CONN_USER: ${DB_USER_NAME}
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: admin
restart: unless-stopped
networks:
default:
ports:
- "${PGADMIN_PORT}:80"
depends_on:
postgres:
condition: service_healthy