2024-10-19 13:28:53 +02:00
|
|
|
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: .
|
2024-10-21 13:41:13 +02:00
|
|
|
image: codeberg.org/forgefed/vervis:0.1
|
2024-10-19 13:28:53 +02:00
|
|
|
restart: always
|
2024-10-19 23:27:31 +02:00
|
|
|
command: ./vervis config/settings.yml > log/vervis.log 2>&1
|
2024-10-19 13:28:53 +02:00
|
|
|
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
|
2024-10-19 23:27:31 +02:00
|
|
|
- ./config:/app/config
|
2024-10-19 13:28:53 +02:00
|
|
|
|
2024-10-21 13:41:13 +02:00
|
|
|
# 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
|
|
|
|
|
2024-10-19 13:28:53 +02:00
|
|
|
networks:
|
|
|
|
external_network:
|
|
|
|
internal_network:
|
|
|
|
internal: true
|