sameersbn / sameersbn/docker-gitlab
Restored gitlab data missing after restarting docker.
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 8.1k
- Forks
- 2.1k
- Avg merge
- 17h 47m
- Merged PRs (30d)
- 7
Description
Whenever I restart the docker and try to login to Gitlab it cannot check for my account. I believe the database data were gone everytime I restart docker. But whenever I restore the backup I can login and the data were fully restored.
Anyone who encountered this issue?
I can create backup using this command:
docker-compose run --rm gitlab app:rake gitlab:backup:create
and I restore the backup using this command:
docker-compose run --rm gitlab app:rake gitlab:backup:restore BACKUP=123456789
here's my docker-compose.yml
version: '2'
services:
redis:
restart: always
image: sameersbn/redis:latest
command:
- --loglevel warning
volumes:
- /srv/docker/gitlab/redis:/var/lib/redis:Z
postgresql:
restart: always
image: sameersbn/postgresql:9.6-2
volumes:
- /srv/docker/gitlab/postgresql:/var/lib/postgresql:Z
environment:
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production
- DB_EXTENSION=pg_trgm
gitlab:
restart: always
image: sameersbn/gitlab:8.12.4
depends_on:
- redis
- postgresql
ports:
- "10080:80"
- "10022:22"
volumes:
- /Users/techx/gitlab/gitlab/:/home/git/data:Z
environment:
- DEBUG=false
- DB_ADAPTER=postgresql
- DB_HOST=postgresql
- DB_PORT=5432
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production
- REDIS_HOST=redis
- REDIS_PORT=6379
- TZ=Asia/Singapore
- GITLAB_TIMEZONE=Singapore
- GITLAB_HTTPS=false
- SSL_SELF_SIGNED=false
- GITLAB_HOST=localhost
- GITLAB_PORT=10080
- GITLAB_SSH_PORT=10022
- GITLAB_RELATIVE_URL_ROOT=
- GITLAB_SECRETS_DB_KEY_BASE=QcDrKlcSBvpBDQG4TQBJ5vzzJhjBsR98nGfNcGKsspdwFdDQVKtTpM4RdCHFbLg2
- GITLAB_SECRETS_SECRET_KEY_BASE=jCs739gp5w8BlmrWNShBMdCCKhsbXwPn5ML5S7sXptncrqpMwbC3BknQB6p8zgJL
- GITLAB_SECRETS_OTP_KEY_BASE=P62MRkJPvPNqZMGBkBVwcP5qV4fGNcl54JK7HSRKbhdhqq2RJL3q4VQJKRN2qbbB
- GITLAB_ROOT_PASSWORD=password
- GITLAB_ROOT_EMAIL=email@example.com
- GITLAB_NOTIFY_ON_BROKEN_BUILDS=true
- GITLAB_NOTIFY_PUSHER=false
- GITLAB_EMAIL=email@example.com
- GITLAB_EMAIL_REPLY_TO=noreply@example.com
- GITLAB_INCOMING_EMAIL_ADDRESS=reply@example.com
- GITLAB_BACKUP_SCHEDULE=daily
- GITLAB_BACKUP_TIME=01:00
- GITLAB_BACKUP_DIR=/home/git/data/backups
- GITLAB_REPOS_DIR=/home/git/data/repositories
- SMTP_ENABLED=true
- SMTP_DOMAIN=www.example.com
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=587
- SMTP_USER=email@example.com
- SMTP_PASS=password
- SMTP_STARTTLS=true
- SMTP_AUTHENTICATION=login
- IMAP_ENABLED=false
- IMAP_HOST=imap.gmail.com
- IMAP_PORT=993
- IMAP_USER=mailer@example.com
- IMAP_PASS=password
- IMAP_SSL=true
- IMAP_STARTTLS=false
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with docker-compose.yml and inspect the PostgreSQL and GitLab volume mappings, especially /srv/docker/gitlab/postgresql and /Users/techx/gitlab/gitlab/. Review the backup and restore commands shown in the issue, then reproduce a Docker restart and login attempt. Done means the GitLab account and database data remain available after restarting Docker without restoring a backup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, gitlab
- Domain
- databases, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100