-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (44 loc) · 953 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
version: "3.8"
services:
pgdb:
image: postgres:15.1-alpine
networks:
- my-network
env_file: ./.env
environment:
- POSTGRES_USER=$POSTGRESDB_USER
- POSTGRES_PASSWORD=$POSTGRESDB_ROOT_PASSWORD
- POSTGRES_DB=$POSTGRESDB_DATABASE
ports:
- 5432:5432
volumes:
- db:/var/lib/postgres
redis-stack:
image: redis:latest
networks:
- my-network
ports:
- "6379:6379"
- "8001:8001"
blogging-platform-api:
depends_on:
- pgdb
- redis-stack
build: ./
restart: unless-stopped
networks:
- my-network
environment:
- DATABASE_URL=postgresql://postgres:123456@pgdb:5432/apidb?connect_timeout=300
- PORT=${PORT}
- JWT_ACCESS_TOKEN=${JWT_ACCESS_TOKEN}
- REDIS_HOST=redis-stack
- REDIS_PORT=${REDIS_PORT}
ports:
- "8000:8000"
stdin_open: true
tty: true
networks:
my-network:
volumes:
db: