-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
42 lines (39 loc) · 947 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
services:
frontend:
container_name: lsm_frontend
build:
context: .
dockerfile: ./ui/Dockerfile
ports:
- "3000:3000"
postgres:
image: postgres:15
container_name: lsm_database
restart: always
environment:
POSTGRES_USER: osvuser
POSTGRES_PASSWORD: osvpassword
POSTGRES_DB: osvdb
volumes:
- postgres_data:/var/lib/postgresql/data
- ./api/db/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U osvuser -d osvdb"]
interval: 5s
retries: 5
api:
container_name: lsm_api
build:
context: ./api
dockerfile: Dockerfile
depends_on:
postgres:
condition: service_healthy
environment:
- DATABASE_URL=postgresql://osvuser:osvpassword@lsm_database:5432/osvdb?sslmode=disable
ports:
- "8080:8080"
volumes:
postgres_data: