Skip to content

deploy to amazon linux #4

deploy to amazon linux

deploy to amazon linux #4

Workflow file for this run

name: Deploy
on: push
jobs:
Deploy:
name: Deploy to Staging
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build & Deploy
env:
PRIVATE_KEY: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
HOSTNAME: ec2-18-207-237-97.compute-1.amazonaws.com
USER_NAME: ec2-user
run: |
echo "$PRIVATE_KEY" > private_key && chmod 600 private_key
ssh -o StrictHostKeyChecking=no -i private_key ${USER_NAME}@${HOSTNAME} '
chmod -R 755 /home/ec2-user/Apollo3
chmod 755 /home/ec2-user/Apollo3/docker-compose.yml
sudo yum update -y
sudo amazon-linux-extras install docker
sudo yum install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
cd ~/Apollo3
sudo docker-compose up -d
sudo docker-compose cp ./docker/config/config.json jbrowse-web:/usr/local/apache2/htdocs/
'