-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
74 lines (71 loc) · 2.22 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: '2.4'
networks:
topo-net:
name: topo-net
external: true
services:
oscars-backend:
container_name: oscars-nostack-backend
networks:
- topo-net
build:
context: ./
dockerfile: ./deploy/devel/backend.dockerfile
depends_on:
oscars-db:
condition: service_healthy
ports:
- "${OSCARS_BACKEND_WEB_PORT:-8201}:${OSCARS_BACKEND_WEB_PORT:-8201}"
environment:
OSCARS_BACKEND_WEB_PORT: ${OSCARS_BACKEND_WEB_PORT:-8201}
SPRING_DATASOURCE_URL: jdbc:postgresql://oscars-db:5432/${POSTGRES_DB:-oscars}
POSTGRES_USER: ${POSTGRES_USER:-oscars}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD-secret}
ESDB_API_KEY: ${ESDB_API_KEY}
ESDB_URI: ${ESDB_URI}
TOPO_OSCARS_URL: ${TOPO_OSCARS_URL:-http://topo-oscars:8004/oscars-one/topology}
NSO_USERNAME: ${NSO_USERNAME}
NSO_PASSWORD: ${NSO_PASSWORD}
NSO_URI: ${NSO_URI}
healthcheck:
test: nc -z localhost ${OSCARS_BACKEND_WEB_PORT:-8201} || exit -1
start_period: 15s
interval: 5s
timeout: 10s
retries: 10
oscars-db:
image: "postgres:14.1-alpine"
container_name: oscars-nostack-db
networks:
- topo-net
environment:
POSTGRES_DB: ${POSTGRES_DB:-oscars}
POSTGRES_USER: ${POSTGRES_USER:-oscars}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD-secret}
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB:-oscars} -U ${POSTGRES_USER:-oscars}"]
interval: 5s
timeout: 5s
retries: 5
oscars-frontend:
container_name: oscars-nostack-frontend
build:
context: frontend
# use deploy/prod/frontend.dockerfile for production image
dockerfile: ${OSCARS_FRONTEND_DOCKERFILE:-../deploy/devel/frontend.dockerfile}
# mounted as volumes for dev mode hot reload
volumes:
- ./frontend/src:/app/src
- ./frontend/public:/app/public
environment:
# OSCARS_BACKEND_URL only used by production image
OSCARS_BACKEND_URL: ${OSCARS_BACKEND_URL:-http://oscars-backend:8201}
ports:
- "${OSCARS_FRONTEND_WEB_PORT:-8181}:3000"
networks:
- topo-net
depends_on:
oscars-backend:
condition: service_healthy
links:
- oscars-backend:8201