Skip to content

Commit

Permalink
Merge pull request #203 from fga-eps-mds/feature/179-continuous-deploy
Browse files Browse the repository at this point in the history
#179 Deploy contínuo
  • Loading branch information
mardntas authored Nov 23, 2019
2 parents d6bbc21 + 3992276 commit 0dc9d23
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 31 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: deploy-production

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Docker login
run: docker login --username=${{secrets.DOCKER_USER}} --password=${{secrets.DOCKER_PASS}}
- name: Docker build
run: docker build -t acaciaelis/acacia:django-prod .
- name: Docker push
run: docker push acaciaelis/acacia:django-prod
19 changes: 19 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: deploy-staging

on:
push:
branches:
- develop
- release/*

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Docker login
run: docker login --username=${{secrets.DOCKER_USER}} --password=${{secrets.DOCKER_PASS}}
- name: Docker build
run: docker build -t acaciaelis/acacia:django-staging .
- name: Docker push
run: docker push acaciaelis/acacia:django-staging
30 changes: 0 additions & 30 deletions .github/workflows/deploy.yml

This file was deleted.

18 changes: 17 additions & 1 deletion docker-compose.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
- ./staging-data/postgres/pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
labels:
- "com.centurylinklabs.watchtower.enable=false"

django-staging:
container_name: django-staging
Expand All @@ -23,6 +25,8 @@ services:
- "8000:8000"
depends_on:
- postgres-staging
labels:
- "com.centurylinklabs.watchtower.enable=true"

# Prod -----------------------------------------------------

Expand All @@ -33,6 +37,8 @@ services:
- ./production-data/postgres/pgdata:/var/lib/postgresql/data
ports:
- "5433:5432"
labels:
- "com.centurylinklabs.watchtower.enable=false"

django-production:
container_name: django-production
Expand All @@ -46,4 +52,14 @@ services:
ports:
- "8001:8000"
depends_on:
- postgres-production
- postgres-production
labels:
- "com.centurylinklabs.watchtower.enable=true"

watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 30
labels:
- "com.centurylinklabs.watchtower.enable=false"

0 comments on commit 0dc9d23

Please sign in to comment.