-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (40 loc) · 994 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
services:
postgres:
hostname: ${POSTGRES_HOST}
image: postgres:15.1-alpine
volumes:
- pgdata:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PORT=${POSTGRES_PORT}
networks:
- backend
restart: always
ports:
- ${POSTGRES_PORT}:5432 # Don't forward port in production, only use for convenience in development
api:
image: ${IMAGE_NAME}:${IMAGE_VERSION}
build:
context: .
dockerfile: Dockerfile
volumes:
- ./logs/:/api/logs/
environment:
- DATABASE_URL=${DATABASE_URL}
- API_PORT=${API_PORT}
- JWT_ACCESS_SECRET=${JWT_ACCESS_SECRET}
depends_on:
- postgres
networks:
- backend
restart: always
ports:
- ${API_PORT}:${API_PORT}
volumes:
pgdata:
networks:
backend:
name: ${NETWORK_NAME}