| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- version: '3'
- services:
- postgres:
- image: postgres:15-alpine
- container_name: gogs-test-postgres
- restart: unless-stopped
- environment:
- POSTGRES_USER: gogs
- POSTGRES_PASSWORD: gogs
- POSTGRES_DB: gogs
- volumes:
- - postgres-data:/var/lib/postgresql/data
- networks:
- - gogs-test
- healthcheck:
- test: ["CMD-SHELL", "pg_isready -U gogs"]
- interval: 10s
- timeout: 5s
- retries: 5
- gogs:
- build:
- context: .
- dockerfile: Dockerfile
- container_name: gogs-test
- restart: unless-stopped
- ports:
- - "10022:22"
- - "10080:3000"
- volumes:
- - gogs-data:/data
- - ./custom:/data/gogs
- depends_on:
- postgres:
- condition: service_healthy
- networks:
- - gogs-test
- environment:
- - SOCAT_LINK=false
- healthcheck:
- test: ["CMD", "curl", "-f", "http://localhost:3000/healthcheck"]
- interval: 30s
- timeout: 10s
- retries: 3
- start_period: 60s
- networks:
- gogs-test:
- driver: bridge
- volumes:
- postgres-data:
- gogs-data:
|