0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

xza(NG)

Last updated at Posted at 2019-03-19

# yum list installed |grep -i docker
# sudo yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2
# sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
# sudo yum install docker-ce docker-ce-cli containerd.io
# sudo systemctl start docker
# sudo docker run hello-world
# sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# chmod +x /usr/local/bin/docker-compose

# docker --version
Docker version 18.09.3, build 774a1f4
# docker-compose --version
docker-compose version 1.23.2, build 1110ad01

setup the growi on docker

# yum install git -y
# mkdir /opt/docker
# cd /otp/docker
# git clone https://github.com/weseek/growi-docker-compose.git
# cd growi-docker-compose/
# cp -p docker-compose.yml docker-compose.yml.ORIG
# vim docker-compose.yml
*** docker-compose.yml.ORIG	2019-03-19 22:54:46.449351099 +0900
--- docker-compose.yml	2019-03-19 22:56:06.424903007 +0900
***************
*** 6,12 ****
        context: .
        dockerfile: ./Dockerfile
      ports:
!       - 127.0.0.1:3000:3000    # localhost only by default
      links:
        - mongo:mongo
        - elasticsearch:elasticsearch
--- 6,13 ----
        context: .
        dockerfile: ./Dockerfile
      ports:
!       - 3000:3000
! #     - 127.0.0.1:3000:3000    # localhost only by default
      links:
        - mongo:mongo
        - elasticsearch:elasticsearch
***************
*** 16,22 ****
      environment:
        - MONGO_URI=mongodb://mongo:27017/growi
        - ELASTICSEARCH_URI=http://elasticsearch:9200/growi
!       - PASSWORD_SEED=changeme
        # - FILE_UPLOAD=local     # activate this line if you use local storage of server rather than AWS
        # - MATHJAX=1             # activate this line if you want to use MathJax
        # - PLANTUML_URI=http://  # activate this line and specify if you use your own PlantUML server rather than public plantuml.com
--- 17,24 ----
      environment:
        - MONGO_URI=mongodb://mongo:27017/growi
        - ELASTICSEARCH_URI=http://elasticsearch:9200/growi
! #     - PASSWORD_SEED=changeme
!       - PASSWORD_SEED=pass12345
        # - FILE_UPLOAD=local     # activate this line if you use local storage of server rather than AWS
        # - MATHJAX=1             # activate this line if you want to use MathJax
        # - PLANTUML_URI=http://  # activate this line and specify if you use your own PlantUML server rather than public plantuml.com

install nginx on docker

# mkdir /opt/docker/nginx-proxy
# cd /opt/docker/nginx-proxy
# vim docker-compose.yml
version: '3'

services:
  nginx-proxy:
    image: jwilder/nginx-proxy
    restart: on-failure
    labels:
      - com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=jwilder/nginx-proxy
    ports:
      - 80:80
      - 443:443
    volumes:
      - proxy:/etc/nginx/vhost.d
      - proxy:/usr/share/nginx/html
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ./certs:/etc/nginx/certs:ro
    network_mode: bridge

  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    restart: on-failure
    depends_on:
      - nginx-proxy
    volumes:
      - proxy:/etc/nginx/vhost.d
      - proxy:/usr/share/nginx/html
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./certs:/etc/nginx/certs:rw
    network_mode: bridge

volumes:
  proxy:

nginx てすと


0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?