-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
57 lines (57 loc) · 1.41 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
version: '3.9'
services:
app:
container_name: ${APP_CONTAINER}
image: app
restart: unless-stopped
command: sh -c "npm install --force && npm run start:dev"
build:
context: .
dockerfile: Dockerfile
platforms:
- linux/arm64
volumes:
- ./:/usr/src/app
- ./:/node_modules
ports:
- ${PORT}:${PORT}
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
postgres:
container_name: ${DB_CONTAINER}
image: postgres:latest
restart: unless-stopped
ports:
- ${DB_PORT}:${DB_PORT}
env_file:
- .env
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
TZ: ${TIME_ZONE}
POSTGRES_INITDB_ARGS: '--encoding=UTF8 --locale=en_US.UTF-8'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${DB_USER} -d ${DB_NAME}']
interval: 5s
retries: 3
timeout: 3s
volumes:
- './Docker/database/postgres/data:/var/lib/postgresql/data'
adminer:
container_name: ${DB_ADMIN_CONTAINER}
image: adminer
restart: on-failure
depends_on:
postgres:
condition: service_healthy
ports:
- '${DB_ADMIN_PORT}:8080'
environment:
ADMINER_DEFAULT_SERVER: postgres
ADMINER_DEFAULT_USERNAME: ${DB_USER}
ADMINER_DEFAULT_PASSWORD: ${DB_PASSWORD}
ADMINER_DESIGN: hydra