60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
services:
|
|
db:
|
|
restart: always
|
|
image: postgres:15-bookworm
|
|
shm_size: 128mb
|
|
networks:
|
|
- internal_network
|
|
healthcheck:
|
|
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
|
volumes:
|
|
- ./postgres15:/var/lib/postgresql/data
|
|
- ./create-db.sql:/docker-entrypoint-initdb.d/create_database.sql
|
|
environment:
|
|
POSTGRES_PASSWORD: "pg_superuser_password_xyz12345"
|
|
|
|
web:
|
|
# You can uncomment the following line if you want to not use the prebuilt
|
|
# image, for example if you have local code changes
|
|
#build: .
|
|
image: codeberg.org/forgefed/vervis:0.1
|
|
restart: always
|
|
command: ./vervis config/settings.yml > log/vervis.log 2>&1
|
|
networks:
|
|
- external_network
|
|
- internal_network
|
|
healthcheck:
|
|
# prettier-ignore
|
|
# test: ['CMD-SHELL',"curl -s --noproxy localhost localhost:3000/health | grep -q 'OK' || exit 1"]
|
|
test: ['CMD-SHELL',"curl -s --noproxy localhost localhost:3000 | grep -q 'OK' || exit 1"]
|
|
ports:
|
|
- '127.0.0.1:3000:3000'
|
|
- '127.0.0.1:22:5022'
|
|
depends_on:
|
|
- db
|
|
volumes:
|
|
- ./state:/app/state
|
|
- ./config:/app/config
|
|
|
|
# The prebuilt production Vervis image requires HTTPS, a domain and standard
|
|
# ports, so if you want to test that image, NGINX can help
|
|
#nginx:
|
|
# image: nginx:bookworm
|
|
# restart: always
|
|
# depends_on:
|
|
# - web
|
|
# networks:
|
|
# - external_network
|
|
# - internal_network
|
|
# ports:
|
|
# - '127.0.0.1:80:80'
|
|
# - '127.0.0.1:443:443'
|
|
# volumes:
|
|
# - ./nginx.conf:/etc/nginx/conf.d/default.conf
|
|
# - ./nginx-selfsigned.key:/etc/ssl/private/nginx-selfsigned.key
|
|
# - ./nginx-selfsigned.crt:/etc/ssl/certs/nginx-selfsigned.crt
|
|
|
|
networks:
|
|
external_network:
|
|
internal_network:
|
|
internal: true
|