version: '3.9' services: app: build: context: . dockerfile: resources/docker/dev/Dockerfile container_name: qonto-app env_file: - .env ports: - "8000:8000" - "8080:8080" - "8010:8010" volumes: - .:/go/src/github.com/dohernandez/qonto - /tmp/go-build:/root/.cache/go-build depends_on: database: condition: service_healthy database-migrate: image: migrate/migrate container_name: qonto-database-migrate volumes: - ./resources/migrations:/resources/migrations depends_on: database: condition: service_healthy restart: on-failure command: - "-database" - "postgres://qonto:qonto@database:5432/qonto_accounts?sslmode=disable" - "-path" - "/resources/migrations" - "up" database: image: postgres:13.1-alpine container_name: qonto-database restart: always environment: POSTGRES_PASSWORD: qonto POSTGRES_USER: qonto POSTGRES_DB: qonto_accounts ports: - "5432:5432" healthcheck: test: [ "CMD-SHELL", "pg_isready -U postgres" ] interval: 2s timeout: 20s retries: 5 start_period: 3s