version: '3.9' services: redis-kv: image: redis:latest networks: - srht-net database: image: postgres:latest volumes: - db-data:/var/lib/postgresql/data - ./postgres_sh:/docker-entrypoint-initdb.d environment: POSTGRES_USER: sourcehut POSTGRES_PASSWORD: sourcehut POSTGRES_MULTIPLE_DATABASES: metasrht,{{database_name}} networks: - srht-net healthcheck: test: ["CMD", "pg_isready", "-U", "metasrht"] interval: 10s timeout: 5s retries: 3 srhts: build: ./ volumes: - git-data:/var/lib/git - ./config.ini:/etc/sr.ht/config.ini - static-data:/usr/lib/python3.9/site-packages/ networks: - srht-net depends_on: database: condition: service_healthy nginx: image: nginx:alpine ports: - '80:80' volumes: - ./nginx_conf/:/etc/nginx/ - static-data:/usr/lib/python3.9/site-packages/ networks: - srht-net depends_on: srhts: condition: service_healthy volumes: db-data: git-data: static-data: networks: srht-net: driver: bridge