Skip to content

Instantly share code, notes, and snippets.

@ahromis
Last active August 30, 2024 00:30
Show Gist options
  • Save ahromis/4ce4a58623847ca82cb1b745c2f83c82 to your computer and use it in GitHub Desktop.
Save ahromis/4ce4a58623847ca82cb1b745c2f83c82 to your computer and use it in GitHub Desktop.
Gogs docker-compose.yml

Gogs docker-compose

Run with POSTGRES_USER=<your_db_user> POSTGRES_PASSWORD=<your_db_password> docker-compose up -d

version: '2'
services:
postgres:
image: postgres:9.5
restart: always
environment:
- "POSTGRES_USER=${POSTGRES_USER}"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
- "POSTGRES_DB=gogs"
volumes:
- "db-data:/var/lib/postgresql/data"
networks:
- gogs
gogs:
image: gogs/gogs:latest
restart: always
ports:
- "10022:22"
- "3000:3000"
links:
- postgres
environment:
- "RUN_CROND=true"
networks:
- gogs
volumes:
- "gogs-data:/data"
depends_on:
- postgres
networks:
gogs:
driver: bridge
volumes:
db-data:
driver: local
gogs-data:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment