diff --git a/docker-compose.yml b/docker-compose.yml index 9684fe2..e106085 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,3 +12,28 @@ ports: - "${GITBUCKET_BIND:-127.0.0.1}:${GITBUCKET_WEB_PORT:-8080}:8080" - "${GITBUCKET_BIND:-127.0.0.1}:${GITBUCKET_SSH_PORT:-29418}:29418" + networks: + gitbucket-network: + aliases: + - gitbucket + + mysql-gitbucket: + image: mysql:5.7 + restart: always + environment: + - MYSQL_ROOT_PASSWORD=${GITBUCKET_DATABASE_ROOT} + - MYSQL_DATABASE=${GITBUCKET_DATABASE} + - MYSQL_USER=${GITBUCKET_DATABASE_USER} + - MYSQL_PASSWORD=${GITBUCKET_DATABASE_PASSWORD} + networks: + gitbucket-network: + aliases: + - mysql + +networks: + gitbucket-network: + driver: bridge + ipam: + driver: default + config: + - subnet: 172.22.2.0/24 diff --git a/gitbucket.conf b/gitbucket.conf index 9c0806e..29db8ef 100644 --- a/gitbucket.conf +++ b/gitbucket.conf @@ -1,3 +1,23 @@ +## gitbucket configuration +# host to bind the ports above to GITBUCKET_BIND=127.0.0.1 + +# web port GITBUCKET_WEB_PORT=8080 + +# ssh port GITBUCKET_SSH_PORT=29418 + + +## database configuration +# mysql root user password +GITBUCKET_DATABASE_ROOT=83wwX7YMRKnVIsGIxPyPwu9u6SaZ + +# database for gibucket +GITBUCKET_DATABASE=gitbucket + +# database user +GITBUCKET_DATABASE_USER=gitbucket + +# database password +GITBUCKET_DATABASE_PASSWORD=QzB3htEVYNV5aKd1RLFZi9LcSd2F