-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (42 loc) · 909 Bytes
/
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
version: '3'
services:
# NodeJS api
api:
build: .
env_file: .env
volumes:
- ./:/app
expose:
- ${PORT}
ports:
- ${PORT}:${PORT}
# Postgres relational database
psql:
image: postgres:14.3-alpine
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- '${POSTGRES_PORT}:${POSTGRES_PORT}'
volumes:
- psql:/var/lib/postgresql/data
- ./cfg/postgres:/docker-entrypoint-initdb.d
# Redis cache database
redis:
image: redis:7.0.2-alpine
restart: always
ports:
- '${REDIS_PORT}:${REDIS_PORT}'
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
volumes:
- redis:/data
# NoSQL
# Queue
# Volumes
volumes:
psql:
driver: local
redis:
driver: local