-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
executable file
·61 lines (61 loc) · 1.45 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
version: '3'
services:
app.test:
build:
context: .docker/runtimes/16
dockerfile: Dockerfile
args:
APP_PORT: '${APP_PORT}'
image: nocker-1.0/app
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- '${APP_PORT:-3000}:3000'
environment:
NODE_ENV: '${APP_ENV}'
APP_NAME: '${APP_NAME}'
volumes:
- '.:/var/www/html'
networks:
- nocker
depends_on:
- pgsql
- redis
pgsql:
image: 'postgres:14'
ports:
- '${FORWARD_DB_PORT:-5432}:5432'
environment:
PGPASSWORD: '${DB_PASSWORD:-secret}'
POSTGRES_DB: '${DB_DATABASE:-nocker}'
POSTGRES_USER: '${DB_USERNAME:-nocker}'
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
volumes:
- 'nocker-pgsql:/var/lib/postgresql/data'
- './docker/database/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
networks:
- nocker
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}" ]
retries: 3
timeout: 5s
redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- 'nocker-redis:/data'
networks:
- nocker
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
retries: 3
timeout: 5s
networks:
nocker:
driver: bridge
volumes:
nocker-pgsql:
driver: local
nocker-redis:
driver: local