Open Ageraluon opened 6 years ago
If instead using sameersbn/mysql, as in the following docker-compose file:
version: "3.6"
services:
gitlab:
image: 'sameersbn/gitlab:latest'
ports:
- "8101:443" #HTTPS Port
- "8102:80" #HTTP Port
- "8103:22" #SSH Port
#restart: always
environment:
- DEBUG=true
- DB_ADAPTER=mysql2
- DB_HOST=con_database
- DB_PORT=3306
- DB_USER=gitlab
- DB_PASS=testpassword
- DB_NAME=gitlabhq_production
- REDIS_HOST=con_redis
- REDIS_PORT=6379
- TZ=Europe/Berlin
- GITLAB_TIMEZONE=Berlin
- GITLAB_HTTPS=false
- SSL_SELF_SIGNED=false
- GITLAB_HOST=localhost
- GITLAB_PORT=8102
- GITLAB_SSH_PORT=8103
- GITLAB_RELATIVE_URL_ROOT=
- GITLAB_SECRETS_DB_KEY_BASE=longandrandomalphanumericstring
- GITLAB_SECRETS_SECRET_KEY_BASE=longandrandomalphanumericstring
- GITLAB_SECRETS_OTP_KEY_BASE=longandrandomalphanumericstring
- GITLAB_BACKUP_SCHEDULE=daily
- GITLAB_BACKUP_TIME=01:00
container_name: con_gitlab
networks:
- net_RevProxyLinux
- net_GitLab
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80"]
interval: 3m
timeout: 20s
retries: 3
start_period: 1m
#For user session data
redis:
restart: always
image: sameersbn/redis:latest
networks:
- net_GitLab
container_name: con_redis
#For permanent user data
database:
#restart: always
image: sameersbn/mysql:latest
environment:
- DB_NAME=gitlabhq_production
- DB_USER=gitlab
- MARIADB_PASSWORD=testpassword
networks:
- net_GitLab
container_name: con_database
networks:
net_RevProxyLinux:
net_GitLab:
The output is as follows:
... con_gitlab | + [[ false == true ]] con_gitlab | + case ${1} in con_gitlab | + SUPERVISOR_PID=591 con_gitlab | + migrate_database con_gitlab | + /usr/bin/supervisord -nc /etc/supervisor/supervisord.conf con_gitlab | + case ${DB_ADAPTER} in con_gitlab | + QUERY='SELECT count() FROM information_schema.tables WHERE table_schema = '\''gitlabhq_production'\'';' con_gitlab | ++ mysql -h con_database -P 3306 -u gitlab -pL86JIYwMpm443qcz5RV9 -ss -e 'SELECT count() FROM information _schema.tables WHERE table_schema = '\''gitlabhq_production'\'';' con_gitlab | mysql: [Warning] Using a password on the command line interface can be insecure. con_gitlab | + COUNT=0 con_gitlab | + [[ -z 0 ]] con_gitlab | + [[ 0 -eq 0 ]] con_gitlab | + echo 'Setting up GitLab for firstrun. Please be patient, this could take a while...' con_gitlab | Setting up GitLab for firstrun. Please be patient, this could take a while... con_gitlab | + exec_as_git force=yes bundle exec rake gitlab:setup con_gitlab | ++ whoami con_gitlab | + [[ root == git ]] con_gitlab | + sudo -HEu git force=yes bundle exec rake gitlab:setup con_gitlab | 2018-06-18 16:33:12,103 CRIT Supervisor running as root (no user in config file) con_gitlab | 2018-06-18 16:33:12,103 WARN Included extra file "/etc/supervisor/conf.d/cron.conf" during parsing con_gitlab | 2018-06-18 16:33:12,103 WARN Included extra file "/etc/supervisor/conf.d/gitaly.conf" during parsing con_gitlab | 2018-06-18 16:33:12,103 WARN Included extra file "/etc/supervisor/conf.d/gitlab-workhorse.conf" during par sing con_gitlab | 2018-06-18 16:33:12,103 WARN Included extra file "/etc/supervisor/conf.d/mail_room.conf" during parsing con_gitlab | 2018-06-18 16:33:12,103 WARN Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing con_gitlab | 2018-06-18 16:33:12,103 WARN Included extra file "/etc/supervisor/conf.d/sidekiq.conf" during parsing con_gitlab | 2018-06-18 16:33:12,103 WARN Included extra file "/etc/supervisor/conf.d/sshd.conf" during parsing con_gitlab | 2018-06-18 16:33:12,103 WARN Included extra file "/etc/supervisor/conf.d/unicorn.conf" during parsing con_gitlab | 2018-06-18 16:33:12,164 INFO RPC interface 'supervisor' initialized con_gitlab | 2018-06-18 16:33:12,165 CRIT Server 'unix_http_server' running without any HTTP authentication checking con_gitlab | 2018-06-18 16:33:12,165 INFO supervisord started with pid 591 con_gitlab | 2018-06-18 16:33:13,169 INFO spawned: 'gitaly' with pid 600 con_gitlab | 2018-06-18 16:33:13,176 INFO spawned: 'sidekiq' with pid 601 con_gitlab | 2018-06-18 16:33:13,183 INFO spawned: 'unicorn' with pid 602 con_gitlab | 2018-06-18 16:33:13,200 INFO spawned: 'mail_room' with pid 603 con_gitlab | 2018-06-18 16:33:13,206 INFO spawned: 'gitlab-workhorse' with pid 604 con_gitlab | 2018-06-18 16:33:13,213 INFO spawned: 'cron' with pid 605 con_gitlab | 2018-06-18 16:33:13,234 INFO spawned: 'nginx' with pid 606 con_gitlab | 2018-06-18 16:33:13,239 INFO spawned: 'sshd' with pid 608 con_gitlab | 2018-06-18 16:33:14,251 INFO success: gitaly entered RUNNING state, process has stayed up for > than 1 sec onds (startsecs) con_gitlab | 2018-06-18 16:33:14,251 INFO success: sidekiq entered RUNNING state, process has stayed up for > than 1 se conds (startsecs) con_gitlab | 2018-06-18 16:33:14,251 INFO success: unicorn entered RUNNING state, process has stayed up for > than 1 se conds (startsecs) con_gitlab | 2018-06-18 16:33:14,251 INFO success: mail_room entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) con_gitlab | 2018-06-18 16:33:14,251 INFO success: gitlab-workhorse entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) con_gitlab | 2018-06-18 16:33:14,251 INFO success: cron entered RUNNING state, process has stayed up for > than 1 secon ds (startsecs) con_gitlab | 2018-06-18 16:33:14,251 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seco nds (startsecs) con_gitlab | 2018-06-18 16:33:14,251 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 secon ds (startsecs) con_gitlab | Missing Rails.application.secrets.openid_connect_signing_key for production environment. The secret will b e generated and stored in config/secrets.yml. con_gitlab | Rails.application.secrets.openid_connect_signing_key was blank, but the literal value in config/secrets.ym l was: con_gitlab | -----BEGIN RSA PRIVATE KEY----- con_gitlab | MIIEpAIBAAKCAQEAyZhwkj6b+i/QqqJJ44kuaS36O3GFtMjqBhXidLzDM0nHNkx4 con_gitlab | 5UmqoiSwGsoA6GqM3B49dn9vbgiC/g8lYpyOmOBQnldSeRRovzC0m7WfD48YxExh con_gitlab | FyQPBdnl93pX1Bo0KiCJDHX11S0jfV/NAuW7bjk7uvoxiXKxGhuGxqHT2l+k5N6E ... ... con_gitlab | -----END RSA PRIVATE KEY----- con_gitlab | con_gitlab | con_gitlab | This probably isn't the expected value for this secret. To keep using a literal Erb string in config/secre ts.yml, replace
<%
with<%%
. con_gitlab exited with code 1
If you can use mysql like this
restart: always
image: mysql:5.7.21
volumes:```
MySQL support was dropped at GitLab 10.0. Migrate to PostgreSQL if you want use newer versions of GitLab.
@nixel2007 Using gitlab 10.8.3 with mysql 5.7.21. So far so good.
This issue has been automatically marked as stale because it has not had any activity for the last 60 days. It will be closed if no further activity occurs during the next 7 days. Thank you for your contributions.
In my setup due to technical restraints, I am trying to setup gitlab with a mysql database, specifically mariadb. For that, I am running the following docker-compose:
after some seconds, the gitlab container shuts down with the following message;
I am not sure what exactly is going on here, so I am hoping you can help me out with the interpretion of the log:
My docker version:
My docker-compose version: