install portainer and gitlab

This commit is contained in:
Mathieu Sanchez 2019-04-03 17:44:05 +09:00
parent 1a1b3c0b00
commit d82db6413c
3 changed files with 25 additions and 5 deletions

View File

@ -24,12 +24,12 @@ server {
listen 443 http2;
listen [::]:443 http2;
ssl on;
# ssl on;
# paths are relative to prefix and not to this file
ssl_certificate /home/c2a/conf/nginx/certs/gitlab.c2a-systeme.fr.cert;
ssl_certificate_key /home/c2a/conf/nginx/certs/gitlab.c2a-systeme.fr.key;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:50m;
# ssl_certificate /home/c2a/conf/nginx/certs/gitlab.c2a-systeme.fr.cert;
# ssl_certificate_key /home/c2a/conf/nginx/certs/gitlab.c2a-systeme.fr.key;
# ssl_session_timeout 5m;
# ssl_session_cache shared:SSL:50m;
# https://bettercrypto.org/static/applied-crypto-hardening.pdf
# https://mozilla.github.io/server-side-tls/ssl-config-generator/

12
docker/install-gitlab.sh Normal file
View File

@ -0,0 +1,12 @@
docker run --detach \
--name gitlab \
--publish 8001:80 \
--publish 44301:443 \
--publish 2201:22 \
--hostname gitlab.c2a-system.dev \
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://gitlab.c2a-system.dev/'; gitlab_rails['gitlab_shell_ssh_port'] = 2201;" \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
--restart unless-stopped \
gitlab/gitlab-ce:latest

View File

@ -0,0 +1,8 @@
docker volume create portainer_data;
docker run --detach \
--name portainer \
--publish 8003:9000 \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume portainer_data:/data \
--restart unless-stopped \
portainer/portainer:latest