Created
June 20, 2018 20:54
-
-
Save InnovativeInventor/f4de383e57642848aa01dc208f36afaa to your computer and use it in GitHub Desktop.
My Gogs Docker Compose file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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