Skip to content

Instantly share code, notes, and snippets.

@InnovativeInventor
Created June 20, 2018 20:54
Show Gist options
  • Save InnovativeInventor/f4de383e57642848aa01dc208f36afaa to your computer and use it in GitHub Desktop.
Save InnovativeInventor/f4de383e57642848aa01dc208f36afaa to your computer and use it in GitHub Desktop.
My Gogs Docker Compose file
# Based off this discussion https://discuss.gogs.io/t/problem-with-docker-compose-to-encapsulate-gogs-with-mysql/1650 (mattddowney)
# Note: You don't actually have to change the SQL passwords if you are on an internal network.
version: '3'
services:
mysql:
image: mysql
restart: always
ports:
- 3306:3306
networks:
- gogs-backend
volumes:
- ~/workspace/db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=rootpass
- MYSQL_DATABASE=gogs
- MYSQL_USER=user
- MYSQL_PASSWORD=pass
gogs:
image: gogs/gogs
depends_on:
- mysql
restart: always
ports:
- 80:3000
- 122:22
networks:
- gogs-backend
volumes:
- ~/workspace/gogs:/data
networks:
gogs-backend:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment