-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
50 lines (44 loc) · 1.23 KB
/
docker-compose.local.yml
File metadata and controls
50 lines (44 loc) · 1.23 KB
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'
# Local override file that starts a Postgres container for local development.
# Usage:
# docker-compose -f docker-compose.local.yml up -d
services:
postgres:
build:
context: ./postgres
dockerfile: Dockerfile
args:
# allow overriding the postgres base image/version at build time
POSTGRES_VERSION: 17.8-alpine3.23
restart: always
ports:
- "5432:5432"
# set shared memory limit when using docker-compose
shm_size: 128mb
environment:
# strictly for local usage, do not push any password to git in real life
POSTGRES_PASSWORD: example
# When running locally, ensure tomcat waits for postgres to start.
tomcat:
build:
context: ./
dockerfile: ./tomcat/Dockerfile
ports:
- "8080:8080"
web:
build:
context: ./web
dockerfile: Dockerfile
args:
DIST_DIR: dist/browser
ports:
# map host 4200 to container 80 (nginx default)
- "4200:80"
depends_on:
- tomcat
healthcheck:
# Test that the built index.html exists and is non-empty inside the container
test: [ "CMD", "test", "-s", "/usr/share/nginx/html/index.html" ]
interval: 30s
timeout: 10s
retries: 3