Created
November 16, 2018 01:45
-
-
Save ossan-pg/005ede47601813c0da9cd62ff1aa9620 to your computer and use it in GitHub Desktop.
Docker Compose サンプル
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
# Nginx 設定ファイルテンプレート | |
server { | |
listen 80; | |
server_name localhost; | |
access_log /var/log/nginx/host.access.log main; | |
error_log /var/log/nginx/host.error.log warn; | |
#error_page 404 /404.html; | |
# redirect server error pages to the static page /50x.html | |
# | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /usr/share/nginx/html; | |
} | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
################################################################################ | |
# Nexus 関連の設定 | |
location /nexus/ { | |
proxy_pass http://${NEXUS_SERVER}/nexus/; | |
} | |
} |
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' | |
services: | |
nginx: | |
image: nginx:alpine | |
restart: always | |
ports: | |
- '80:80' | |
volumes: | |
- ./nginx/conf.d/conf.template:/etc/nginx/conf.d/conf.template | |
- ./nginx/log/access.log:/var/log/nginx/host.access.log | |
- ./nginx/log/error.log:/var/log/nginx/host.error.log | |
networks: | |
- my_nw | |
environment: | |
- NEXUS_SERVER=nexus_web:8081 | |
command: /bin/sh -c "envsubst '$$NEXUS_SERVER' < /etc/nginx/conf.d/conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" | |
nexus: | |
image: sonatype/nexus3:latest | |
container_name: nexus_web | |
restart: always | |
ports: | |
- '8081:8081' | |
volumes: | |
- ./nexus/nexus-data:/nexus-data | |
networks: | |
- my_nw | |
environment: | |
# ベースURL の設定。 | |
# リバースプロキシ側の設定がシンプルになるのでデフォルトから変更しておく。 | |
NEXUS_CONTEXT: 'nexus' | |
mattermost: | |
image: mattermost/mattermost-preview:latest | |
container_name: mattermost_web | |
restart: always | |
ports: | |
- '8065:8065' | |
extra_hosts: | |
- dockerhost:127.0.0.1 | |
volumes: | |
- ./mattermost/mattermost/config/config_docker.json:/mm/mattermost/config/config_docker.json | |
- ./mattermost/mattermost-data:/mm/mattermost-data | |
- ./mattermost/mysql:/var/lib/mysql | |
networks: | |
- my_nw | |
gitlab: | |
image: 'gitlab/gitlab-ce:latest' | |
container_name: gitlab_web | |
restart: always | |
hostname: '127.0.0.1' | |
ports: | |
- '10080:80' | |
- '10443:443' | |
- '10022:22' | |
environment: | |
GITLAB_OMNIBUS_CONFIG: | | |
external_url 'http://127.0.0.1:10080/gitlab' | |
gitlab_rails['gitlab_shell_ssh_port'] = 10022 | |
nginx['listen_port'] = 80 | |
gitlab_rails['ldap_enabled'] = true | |
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' | |
main: # 'main' is the GitLab 'provider ID' of this LDAP server | |
label: 'LDAP' | |
host: 'my.ldap' | |
port: 389 | |
uid: 'sAMAccountName' | |
method: 'plain' # "tls" or "ssl" or "plain" | |
bind_dn: 'cn=CN1,cn=CN2,dc=DC1,dc=DC2' | |
password: 'PASSWORD' | |
active_directory: true | |
allow_username_or_email_login: false | |
base: 'cn=CN2,dc=DC1,dc=DC2' | |
EOS | |
volumes: | |
- ./gitlab/config:/etc/gitlab | |
- ./gitlab/log:/var/log/gitlab | |
- ./gitlab/data:/var/opt/gitlab | |
networks: | |
- my_nw | |
networks: | |
my_nw: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment