Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
84 lines (70 sloc) 2.16 KB
sudo: required
services:
- docker
env:
- DOCKER_COMPOSE_VERSION=1.22.0
before_install:
# install newer docker
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
# install newer docker-compose
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
before_script:
- source scripts/set_env.sh
script:
- docker-compose up --build -d
after_success:
- docker save -o blockon_express.tar blockon_express
- docker save -o blockon_nginx.tar blockon_nginx
after_script:
- docker-compose down
before_deploy:
- zip -r latest.zip blockon-backend blockon-frontend/build blockon_express.tar blockon_nginx.tar scripts docker-compose.yaml appspec.yml
- mkdir -p deploy
- mv latest.zip deploy
deploy:
- provider: s3
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_SECRET_KEY
bucket: blockon.house
region: ap-northeast-2
skip_cleanup: true
local_dir: deploy
on: &1
repo: team-blockon/blockon
branch: release
- provider: codedeploy
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_SECRET_KEY
bucket: blockon.house
region: ap-northeast-2
key: latest.zip
bundle_type: zip
application: blockon
deployment_group: blockon
on: *1
- provider: s3
access_key_id: $DEV_AWS_ACCESS_KEY
secret_access_key: $DEV_AWS_SECRET_KEY
bucket: dev.blockon.house
region: ap-northeast-2
skip_cleanup: true
local_dir: deploy
on: &2
repo: team-blockon/blockon
branch: master
- provider: codedeploy
access_key_id: $DEV_AWS_ACCESS_KEY
secret_access_key: $DEV_AWS_SECRET_KEY
bucket: dev.blockon.house
region: ap-northeast-2
key: latest.zip
bundle_type: zip
application: blockon
deployment_group: blockon
on: *2
You can’t perform that action at this time.