Skip to content

Commit

Permalink
ci: test ansible deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonDumestre committed Feb 7, 2024
1 parent d3874d6 commit 4c93327
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 18 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI devops - Deploy
on:
push:
branches:
- main
- develop
pull_request:

jobs:
build-and-push-docker-image:
runs-on: ubuntu-22.04
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Deploy on Ansible
uses: ansible/ansible-galaxy-action@v1
with:
playbook: TP3/ansible/playbook-deploy.yml

36 changes: 18 additions & 18 deletions TP3/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ services:
- POSTGRES_PASSWORD=pwd

backend:
image: "leondumestre/tp-devops-backend:1.0"
ports:
- "8080:8080"
networks:
- "app-network"
depends_on:
- "database"
environment:
- DATABASE_URL=jdbc:postgresql://database:5432/db
- DATABASE_USER=usr
- DATABASE_PASSWORD=pwd
image: "leondumestre/tp-devops-backend:1.0"
ports:
- "8080:8080"
networks:
- "app-network"
depends_on:
- "database"
environment:
- DATABASE_URL=jdbc:postgresql://database:5432/db
- DATABASE_USER=usr
- DATABASE_PASSWORD=pwd

front:
image: "leondumestre/tp-devops-front:1.0"
ports:
- "80:8080"
networks:
- "app-network"
depends_on:
- "backend"
image: "leondumestre/tp-devops-front:1.0"
ports:
- "80:80"
networks:
- "app-network"
depends_on:
- "backend"

networks:
app-network:
Empty file modified TP3/front/.env.development
100755 → 100644
Empty file.

0 comments on commit 4c93327

Please sign in to comment.