86 lines
1.8 KiB
YAML
86 lines
1.8 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# API Service
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.local
|
|
container_name: ulflow-api
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- .:/app
|
|
- go-modules:/go/pkg/mod
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
- postgres
|
|
networks:
|
|
- ulflow-network
|
|
|
|
# PostgreSQL Database
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: ulflow-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${DB_USER:-user}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
|
|
POSTGRES_DB: ${DB_NAME:-ulflow_db}
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
networks:
|
|
- ulflow-network
|
|
|
|
# Gitea (Git Server, CI/CD, Registry)
|
|
gitea:
|
|
image: gitea/gitea:1.21
|
|
container_name: ulflow-gitea
|
|
restart: unless-stopped
|
|
environment:
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
- GITEA__database__DB_TYPE=postgres
|
|
- GITEA__database__HOST=postgres:5432
|
|
- GITEA__database__NAME=gitea
|
|
- GITEA__database__USER=${DB_USER:-user}
|
|
- GITEA__database__PASSWD=${DB_PASSWORD:-password}
|
|
ports:
|
|
- "3000:3000"
|
|
- "2222:22"
|
|
volumes:
|
|
- gitea-data:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
depends_on:
|
|
- postgres
|
|
networks:
|
|
- ulflow-network
|
|
|
|
# Gitea Runner for CI/CD
|
|
gitea-runner:
|
|
image: gitea/act_runner:latest
|
|
container_name: ulflow-gitea-runner
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- gitea-runner-data:/data
|
|
depends_on:
|
|
- gitea
|
|
networks:
|
|
- ulflow-network
|
|
|
|
volumes:
|
|
postgres-data:
|
|
gitea-data:
|
|
gitea-runner-data:
|
|
go-modules:
|
|
|
|
networks:
|
|
ulflow-network:
|
|
driver: bridge
|