-
-
Save roy-n-roy/ca464ea870a5c41a4e0990070c8ff4a2 to your computer and use it in GitHub Desktop.
Redmine+GitLab+Jenkins
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
#!/bin/bash -f | |
# Redmine, GitLab, Jenkinsのデータをバックアップします | |
# Redmine | |
docker-compose exec redmine redmine-backup-create | |
# GitLab | |
docker-compose exec gitlab gitlab-backup | |
docker-compose exec gitlab gitlab-ctl backup-etc | |
# Jenkins | |
docker-compose exec jenkins tar cf /backups/jenkins-$(date +'%Y%m%d-%H%M%S').tar.gz -C /var/ jenkins_home | |
exit 0 |
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
version: '3.5' | |
services: | |
nginx-proxy: | |
image: nginx:alpine | |
ports: | |
- "80:80" | |
volumes: | |
- ./nginx.conf:/etc/nginx/nginx.conf | |
depends_on: | |
- redmine | |
- gitlab | |
- jenkins | |
restart: unless-stopped | |
redmine: | |
image: sameersbn/redmine:latest | |
environment: | |
DB_ADAPTER: postgresql | |
DB_HOST: redmine_postgres | |
DB_NAME: redmine | |
DB_USER: redmine | |
DB_PASS: redmine | |
MEMCACHE_HOST: redmine_memcached | |
SMTP_USER: user@gmail.com | |
SMTP_PASS: PASSWORD | |
REDMINE_BACKUPS_DIR: /home/redmine/backups | |
REDMINE_RELATIVE_URL_ROOT: /redmine | |
volumes: | |
- redmine_data:/home/redmine/data | |
- gitlab_data:/home/redmine/gitlab:ro | |
- ./backups/redmine:/home/redmine/backups | |
depends_on: | |
- redmine_postgres | |
restart: unless-stopped | |
redmine_postgres: | |
image: postgres:latest | |
environment: | |
POSTGRES_USER: redmine | |
POSTGRES_PASSWORD: redmine | |
POSTGRES_DB: redmine | |
volumes: | |
- redmine_postgresql_data:/var/lib/postgresql/data:rw | |
restart: unless-stopped | |
redmine_memcached: | |
image: memcached:latest | |
gitlab: | |
restart: always | |
image: gitlab/gitlab-ce:latest | |
volumes: | |
- gitlab_config:/etc/gitlab:Z | |
- gitlab_logs:/var/log/gitlab:Z | |
- gitlab_data:/var/opt/gitlab:Z | |
- ./backups/gitlab:/mnt/backups/gitlab:Z | |
environment: | |
GITLAB_OMNIBUS_CONFIG: | | |
# URL | |
external_url 'http://gitlab/gitlab' | |
# Backup directory | |
gitlab_rails['backup_path'] = '/mnt/backups/gitlab' | |
# Timezone | |
gitlab_rails['time_zone'] = 'Asia/Tokyo' | |
gitlab_rails['smtp_enable'] = true | |
gitlab_rails['smtp_address'] = "smtp.gmail.com" | |
gitlab_rails['smtp_port'] = 587 | |
gitlab_rails['smtp_user_name'] = "user@gmail.com" | |
gitlab_rails['smtp_password'] = "PASSWORD" | |
gitlab_rails['smtp_domain'] = "smtp.gmail.com" | |
gitlab_rails['smtp_authentication'] = "login" | |
gitlab_rails['smtp_enable_starttls_auto'] = true | |
gitlab_rails['smtp_tls'] = false | |
gitlab_rails['smtp_openssl_verify_mode'] = 'peer' # Can be: 'none', 'peer', 'client_once', 'fail_if_no_peer_cert', see http://api.rubyonrails.org/classes/ActionMailer/Base.html | |
# Add any other gitlab.rb configuration here, each on its own line | |
GITLAB_RELATIVE_URL_ROOT: /gitlab | |
restart: unless-stopped | |
jenkins: | |
image: jenkins:latest | |
ports: | |
- "50000:50000" | |
environment: | |
JENKINS_OPTS: "--prefix=/jenkins" | |
volumes: | |
- jenkins_data:/var/jenkins_home | |
- ./backups/jenkins:/backups | |
volumes: | |
redmine_postgresql_data: | |
driver: local | |
redmine_data: | |
driver: local | |
gitlab_config: | |
driver: local | |
gitlab_logs: | |
driver: local | |
gitlab_data: | |
driver: local | |
jenkins_data: | |
driver: local | |
gitlab_postgresql_data: | |
driver: local |
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
events { | |
worker_connections 16; | |
} | |
http { | |
server { | |
listen 80; | |
server_name localhost; | |
client_max_body_size 100M; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
location /redmine/ { | |
proxy_pass http://redmine:80/redmine/; | |
} | |
location /gitlab/ { | |
proxy_pass http://gitlab:80/gitlab/; | |
} | |
location /jenkins/ { | |
proxy_pass http://jenkins:8080/jenkins/; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment