Build Growai with Centos7

Another site

I wrote it in, but it's over, so I moved to article 1 2019/03/03

Background

I tried to transfer the domain I had for a long time to AWS, so I thought about doing something

Work log

Create an instance on EC2 with t2.small (because elasticsearch was an error with t2.micro) Fixed public IP with Elastic IP Go to ~ / .ssh

ssh -i ~/.ssh/[Key file].pem centos@[IP set]

Initially https://github.com/weseek/growi I tried to start it from, but it didn't work well on the way (I just forgot to open the port when I think about it later ...) https://github.com/weseek/growi-docker-compose Built in So the procedure is blurred

Since it is from a new instance, there are places that include things that are not related to this installation wget

## wget, yarn, node, npm
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
sudo yum -y install wget
sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo
sudo yum install git gcc-c++ make nodejs yarn
sudo npm install -g [email protected]

## selinux
sudo /etc/sysconfig/selinux
sudo vi /etc/sysconfig/selinux

## epel, jdk
sudo yum -y install epel-release
sudo yum -y install java-1.8.0-openjdk

## nginx, docker, docker-compose
sudo yum -y install nginx
sudo yum -y install docker
sudo yum -y install docker-compose

## forever
sudo npm install forever -g

## growi
mkdir personal
cd personal/
git clone https://github.com/weseek/growi.git
cd growi/
sudo sudo git checkout -b v3.3.10 refs/tags/v3.3.10

##After that, I made various trials and errors
##I noticed here that elasticsearch does not start and changed the instance type

## growi-docker-compose
cd ../
git clone https://github.com/weseek/growi-docker-compose.git
sudo vi growi-docker-compose/docker-compose.yml
cd growi-docker-compose/
docker-compose up -d

##I did not start here, so check the error

## service
sudo vi /etc/nginx/nginx.conf
sudo systemctl enable nginx
sudo systemctl start nginx

##Add docker user
sudo groupadd docker
sudo gpasswd -a $USER docker
sudo systemctl restart docker
exit

##Re-ssh and start
cd personal/growi-docker-compose/
docker-compose up -d

Tweaked file

/etc/sysconfig/selinux


#SELINUX=enforcing
SELINUX=disabled

/etc/nginx/nginx.conf


http {
    map $http_upgrade $connection_upgrade {
        default Upgrade;
        ''      close;
    }

    upstream growi {
        server localhost:3000;
    }

    server {
        location / {
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Forwarded-Port $server_port;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://growi;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
            proxy_read_timeout 900s;
        }
    }
}

docker-compose.yml


    #Remove localhost
    ports:
      - 3000:3000    # localhost only by default
    #Enable file upload
    environment:
      - FILE_UPLOAD=local     # activate this line if you use local storage of server rather than AWS

Confirmation

If you do so far http://[ElasticIPで設定したIP] The initial screen was displayed from the browser with At first I didn't open ports 80 and 3000 here in the EC2 security group http://[ElasticIPで設定したIP] http://[ElasticIPで設定したIP]:3000 I was addicted to not seeing either of them. .. ..

afterwards

I was able to set the domain and DNS migrated with Route53 and link the Elastic IP to the subdomain and display it in the migration domain

Recommended Posts

Build Growai with Centos7
Build softether VPN with Centos7.
Build DNS server with CentOS8 and bind
Build Doma1 with Ant
Use CentOS with LXD
Build Java with Wercker
Build bazel with alpine
Build GitLab / Mattermost with DockerForWindows
Network install CentOS 8 with Kickstart.
Prepare Python3 environment with CentOS7
Build docker environment with WSL
Build Ubuntu 18.04.5 with dual boot
Ninja-build with smart differential build
Build AWS Lambda with Quarkus
[Introduction] Build MVC with Scala
Build DynamoDB local with Docker
Build a CentOS 8 virtual environment on your Mac with VirtualBox
Build an environment where pip3 can be used with CentOS7 + Python3
Build a Java project with Gradle
Build a Node.js environment with Docker
Build a Tomcat 8.5 environment with Pleiades 4.8
Build PlantUML environment with VSCode + Docker
Build environment with vue.js + rails + docker
Build Rails environment with Docker Compose
WordPress with Docker Compose on CentOS 8
Java build with mac vs code
Build Virtual Box & Vagrant & Centos7 & GitLab
Build jooby development environment with Eclipse
Build Virtual Box & Vagrant & Centos7 & Artifactory
Build docker + laravel environment with laradock
Build WebRTC Janus with Docker container
Spring Boot gradle build with Docker
Switch with CentOS7 series + JDK-9.0.1 + JDK1.8.0 + alternatives
Build a development environment on AWS EC2 with CentOS7 + Nginx + pm2 + Nuxt.js
Install PHP7.4 to build CentOS7 Laravel environment
Set up ImpressPages 5.0 with LAMP on CentOS 7.3
Countermeasures for FDclone build failure on CentOS 8
Developed with CentOS8.1 + Emacs26.1 + WSL2 with Ubuntu20.04 + VcXsrv
Build a PureScript development environment with Docker
Build and manage RStudio environment with Docker-compose
CICS-Run Java applications-(3) Build management with Gradle
Build REST API with Apache2 + Passenger + Sinatra.
Run Keras with CentOS7 + Anaconda + Django + Apache
Build a Wordpress development environment with Docker
De-cron! Build a job scheduler with Rundeck
Personal tips on working with CentOS servers
Build OpenCV with Java Wrapper on Ubuntu 18.04
I tried to build AdoptOpenjdk 11 on CentOS 7
Build Nuxt TypeScript + Vuetify environment with docker-compose
[Docker] Build Jupyter Lab execution environment with Docker
Build an environment with Docker on AWS
Build TensorFlow operation check environment with Docker
How to build Rails 6 environment with Docker
Build Zabbix server at explosive speed (CentOS 7)