-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
executable file
·57 lines (52 loc) · 1.21 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:
rest-api-server:
image: rest-api-server
container_name: rest-api-server
networks:
- rest-api-network
build:
context: .
dockerfile: ./Dockerfile
args:
NODE_ENV: ${NODE_ENV}
APP_PORT: ${APP_PORT}
env_file: ./.env
ports:
- ${APP_PORT}:${APP_PORT}
restart: unless-stopped
rest-api-redis:
image: redis:7
container_name: rest-api-redis
networks:
- rest-api-network
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
volumes:
- ./.cloud/redis.conf:/usr/local/etc/redis/redis.conf
- rest-api-redis-data:/data
ports:
- ${REDIS_PORT}:6379
restart: unless-stopped
rest-api-db:
image: postgres:15
container_name: rest-api-db
networks:
- rest-api-network
volumes:
- rest-api-db-data:/var/lib/postgresql/data
environment:
TZ: 'UTC'
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- ${DB_PORT}:5432
restart: unless-stopped
volumes:
rest-api-redis-data:
driver: local
rest-api-db-data:
driver: local
networks:
rest-api-network:
name: rest-api-network