-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (47 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
48
49
50
51
version: '3.9'
services:
app:
build:
context: ./
dockerfile: Dockerfile
target: development
env_file:
- .env.development
volumes:
- ./:/app
ports:
- ${PORT}:${PORT}
depends_on:
- postgres
- redis
networks:
- app-network
restart: unless-stopped
command: npm run start:dev
postgres:
image: postgres:16.1
restart: always
environment:
POSTGRES_DB: '${DB_DATABASE}'
POSTGRES_USER: '${DB_USERNAME}'
POSTGRES_PASSWORD: '${DB_PASSWORD}'
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- ${DB_PORT}:5432
networks:
- app-network
redis:
image: redis:7.2.4
restart: always
ports:
- ${REDIS_PORT}:6379
networks:
- app-network
volumes:
- redis-data:/data
volumes:
postgres-data:
redis-data:
networks:
app-network: