1
0
Fork 0
vervis-docker-ansible/vars/compose.yml

45 lines
1.4 KiB
YAML
Raw Normal View History

2024-10-21 22:37:49 +02:00
---
services:
db:
restart: always
image: "{{ vervis_postgres_docker_image }}"
shm_size: 128mb
networks:
- internal_network
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres']
volumes:
- "{{ vervis_host_base_path }}/postgres15:/var/lib/postgresql/data"
- "{{ vervis_host_base_path }}/create-db.sql:/docker-entrypoint-initdb.d/create_database.sql:ro"
environment:
POSTGRES_PASSWORD: "{{ vervis_postgres_su_password }}"
user: "{{ vervis_host_uid }}:{{ vervis_host_gid }}"
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: "{{ vervis_docker_image }}"
restart: always
command: ./vervis config/settings.yml > log/vervis.log 2>&1
networks:
- external_network
- internal_network
healthcheck:
test: ['CMD-SHELL',"curl -s --noproxy localhost localhost:3000 | grep -q 'OK' || exit 1"]
ports:
- '{{ vervis_host_bind_port_http }}:3000'
- '{{ vervis_host_bind_port_ssh }}:5022'
depends_on:
- db
volumes:
- "{{ vervis_host_base_path }}/state:/app/state"
- "{{ vervis_host_base_path }}/config:/app/config:ro"
user: "{{ vervis_host_uid }}:{{ vervis_host_gid }}"
networks:
external_network:
internal_network:
internal: true