diff --git a/.github/workflows/continous-deployment.yml b/.github/workflows/continous-deployment.yml index 348258e..d3957ec 100644 --- a/.github/workflows/continous-deployment.yml +++ b/.github/workflows/continous-deployment.yml @@ -9,7 +9,6 @@ on: - master # allow manual triggers for now too workflow_dispatch: - manual: true # Remember to set the following secrets in your repository's settings: # https://github.com/your_username/itu-minitwit-ci/settings/secrets/actions @@ -50,7 +49,6 @@ jobs: key: ${{ secrets.SSH_KEY }} script: | cd /vagrant/ - docker compose down docker compose pull docker compose up -d diff --git a/Vagrantfile b/Vagrantfile index 3ee8cdc..6622230 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,7 +5,7 @@ Vagrant.configure("2") do |config| config.vm.box = 'digital_ocean' config.vm.box_url = "https://github.com/devopsgroup-io/vagrant-digitalocean/raw/master/box/digital_ocean.box" config.ssh.private_key_path = '~/.ssh/id_rsa' - config.vm.synced_folder ".", "/vagrant", type: "rsync" + config.vm.synced_folder "./docker-compose.yml", "/vagrant", type: "rsync" ######################################### # DB - API - WEBAPP (currently all deployed to same server) @@ -47,8 +47,8 @@ Vagrant.configure("2") do |config| sleep 3 cd /vagrant - echo "Building and starting containers..." - sudo docker compose build + echo "Pulling and running containers" + sudo docker compose pull sudo docker compose up -d THIS_IP=$(hostname -I | cut -d" " -f1) diff --git a/docker-compose.yml b/docker-compose.yml index 88ae2fa..2bf5497 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,7 @@ services: - internal api: + image: cecilieelkjaer/minitwit-api:latest build: context: . dockerfile: src/Chirp.Api/Dockerfile @@ -39,10 +40,11 @@ services: - internal web: + image: cecilieelkjaer/minitwit-web:latest build: context: . dockerfile: src/Chirp.Web/Dockerfile - container_name: Webserver + container_name: webserver environment: - ASPNETCORE_ENVIRONMENT=Development #- ENV ASPNETCORE_URLS="http://+:5000"