プロジェクト

全般

プロフィール

Wiki


以下はメモ

MacBook Pro

  • Homebrew
  • Xcode
  • VirtualBox
    • CoreOSホスト
  • Atom
  • 画面共有
  • 外付けHDD * 2個
  • Zabbix Agent

CoreOSホスト

  • git-flow
  • 秘密鍵
  • Zabbix Agent
  • Docker Engine
  • Docker Compose
  • Dockerコンテナ
    • Redmine
    • Zabbix Server
    • ownCloud
    • GitLab
    • 使い捨て環境

Dockerコンテナ起動手順

# nginx-proxy
docker run \
    --name nginx-proxy \
    --privileged \
    -p 80:80 \
    -p 443:443 \
    -v /mnt/backup/docker/nginx-proxy/certs:/etc/nginx/certs:ro \
    -v /mnt/backup/docker/nginx-proxy/htpasswd:/etc/nginx/htpasswd \
    -v /etc/nginx/vhost.d \
    -v /usr/share/nginx/html \
    -v /var/run/docker.sock:/tmp/docker.sock:ro \
    u6kapps/nginx-proxy

docker run \
    --name letsencrypt-nginx-proxy-companion \
    --privileged \
    -v /mnt/backup/docker/nginx-proxy/certs:/etc/nginx/certs:rw \
    -v /var/run/docker.sock:/var/run/docker.sock:ro \
    --volumes-from nginx-proxy \
    u6kapps/letsencrypt-nginx-proxy-companion

# redmine
docker run \
    --name redmine-mysql \
    -v /mnt/backup/docker/redmine/mysql:/var/lib/mysql \
    -e MYSQL_ROOT_PASSWORD=c4rzMYbccEph97Y2Nz32S3WBZamj8CycPvmHJJXcSrqKnHFE5MvBAZ39aM9X6Yt \
    -e MYSQL_DATABASE=redmine \
    u6kapps/redmine-mysql
docker run \
    --name redmine \
    --link redmine-mysql:db \
    -v /mnt/backup/docker/redmine/attachment-file:/usr/src/redmine/files \
    -e REDMINE_DB_MYSQL=db \
    -e REDMINE_DB_PASSWORD=c4rzMYbccEph97Y2Nz32S3WBZamj8CycPvmHJJXcSrqKnHFE5MvBAZ39aM9X6Yt \
    -e VIRTUAL_HOST=redmine.u6k.me \
    -e VIRTUAL_PORT=3000 \
    -e LETSENCRYPT_HOST=redmine.u6k.me \
    -e LETSENCRYPT_EMAIL=u6k.apps@gmail.com \
    u6kapps/redmine

# jenkins
docker run \
    --name jenkins \
    -v /mnt/backup/docker/jenkins:/root/.jenkins \
    -v /var/run/docker.sock:/var/run/docker.sock:ro \
    -v $(which docker):/usr/bin/docker:ro \
    -e VIRTUAL_HOST=jenkins.u6k.me \
    -e VIRTUAL_PORT=8080 \
    -e LETSENCRYPT_HOST=jenkins.u6k.me \
    -e LETSENCRYPT_EMAIL=u6k.apps@gmail.com \
    u6kapps/jenkins

# owncloud
docker run \
    --name owncloud-mysql \
    -v /mnt/backup/docker/owncloud/mysql:/var/lib/mysql \
    -e MYSQL_ROOT_PASSWORD=Cx2V7Ve4KbQCp6NkjZhskwZfN2NxTbxz652jZsFEBzWEAe8AHnw65mTEbqY5UvF \
    -e MYSQL_DATABASE=owncloud_db \
    u6kapps/owncloud-mysql
docker run \
    --name owncloud \
    --link owncloud-mysql:mysql \
    -v /mnt/backup/docker/owncloud/owncloud:/var/www/html \
    -e VIRTUAL_HOST=owncloud.u6k.me \
    -e VIRTUAL_PORT=80 \
    -e LETSENCRYPT_HOST=owncloud.u6k.me \
    -e LETSENCRYPT_EMAIL=u6k.apps@gmail.com \
    u6kapps/owncloud

# zabbix
docker run \
    --name zabbix-db \
    -v /mnt/backup/docker/zabbix/db:/var/lib/mysql \
    -e MYSQL_ROOT_PASSWORD=mNS5JCSwgaQsy8EErKQQgRaVpvvqGTzbkqwqbuWBRAZ9z7PDhVWJkmYWB7uW2c8 \
    -e MYSQL_DATABASE=zabbix \
    u6kapps/zabbix-db
docker run \
    --name zabbix-server \
    --link zabbix-db:zabbix-db \
    -v /mnt/backup/docker/zabbix/server:/var/lib/zabbix \
    -p 10051:10051 \
    -e DB_SERVER_HOST=zabbix-db \
    -e MYSQL_USER=root \
    -e MYSQL_PASSWORD=mNS5JCSwgaQsy8EErKQQgRaVpvvqGTzbkqwqbuWBRAZ9z7PDhVWJkmYWB7uW2c8 \
    u6kapps/zabbix-server
docker run \
    --name zabbix-webui \
    --link zabbix-server:zabbix-server \
    --link zabbix-db:zabbix-db \
    -e DB_SERVER_HOST=zabbix-db \
    -e MYSQL_USER=root \
    -e MYSQL_PASSWORD=mNS5JCSwgaQsy8EErKQQgRaVpvvqGTzbkqwqbuWBRAZ9z7PDhVWJkmYWB7uW2c8 \
    -e ZBX_SERVER_HOST=zabbix-server \
    -e TZ=Asia/Tokyo \
    -e VIRTUAL_HOST=zabbix.u6k.me \
    -e VIRTUAL_PORT=80 \
    -e LETSENCRYPT_HOST=zabbix.u6k.me \
    -e LETSENCRYPT_EMAIL=u6k.apps@gmail.com \
    u6kapps/zabbix-webui

# rutorrent
docker run \
    -d \
    --name rutorrent \
    -v /mnt/backup/docker/rutorrent/download/:/var/lib/rtorrent/download/ \
    -v /mnt/backup/docker/rutorrent/session/:/var/lib/rtorrent/session/ \
    -e VIRTUAL_HOST=rutorrent.u6k.me \
    -e VIRTUAL_PORT=80 \
    -e LETSENCRYPT_HOST=rutorrent.u6k.me \
    -e LETSENCRYPT_EMAIL=u6k.apps@gmail.com \
    rutorrent-docker

# bookmark
docker run \
    -d \
    --name bookmark-postgres \
    -v /mnt/backup/docker/bookmark:/var/lib/postgresql/data \
    -e POSTGRES_PASSWORD=bookmark_pass \
    -e POSTGRES_USER=bookmark_user \
    -e POSTGRES_DB=bookmark_db \
    postgres
docker run \
    -d \
    --name bookmark \
    --link bookmark-postgres:postgres \
    -e VIRTUAL_HOST=bookmark.u6k.me \
    -e VIRTUAL_PORT=8080 \
    -e LETSENCRYPT_HOST=bookmark.u6k.me \
    -e LETSENCRYPT_EMAIL=u6k.apps@gmail.com \
    u6kapps/bookmark-bundler