49 lines
962 B
YAML
49 lines
962 B
YAML
services:
|
|
postgres:
|
|
image: postgres:16
|
|
container_name: gitea-postgres
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
networks:
|
|
- gitea-net
|
|
# Do NOT publish postgres port
|
|
|
|
gitea:
|
|
image: gitea/gitea:latest
|
|
container_name: gitea
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- postgres
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- gitea-data:/data
|
|
ports:
|
|
- "3000:3000" # HTTP (for NPM)
|
|
- "2222:22" # SSH (optional, safe non-standard port)
|
|
networks:
|
|
- gitea-net
|
|
|
|
pgadmin:
|
|
image: dpage/pgadmin4:latest
|
|
container_name: gitea-pgadmin
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- pgadmin-data:/var/lib/pgadmin
|
|
ports:
|
|
- "8081:80" # pgAdmin UI (proxy or restrict)
|
|
networks:
|
|
- gitea-net
|
|
|
|
networks:
|
|
gitea-net:
|
|
|
|
volumes:
|
|
gitea-data:
|
|
postgres-data:
|
|
pgadmin-data: |