Skip to content

Commit

Permalink
Merge branch 'develop' into fix/search-refactor-isValidDateRange
Browse files Browse the repository at this point in the history
  • Loading branch information
zilola08 committed Jan 19, 2024
2 parents a9cdc0c + 790a210 commit 6da3356
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,20 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build, tag, and push docker image
run: |
docker build --platform linux/amd64 -t ${{ secrets.DOCKER_USERNAME }}/${{env.DOCKERHUB_IMAGE_NAME}}:latest .
docker push ${{ secrets.DOCKER_USERNAME }}/${{env.DOCKERHUB_IMAGE_NAME}}:latest
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/${{env.DOCKERHUB_IMAGE_NAME}}:latest

- name: Rename docker compose config file
run: mv docker-compose.ci.yml docker-compose.yml
Expand All @@ -43,7 +53,7 @@ jobs:
key: ${{ secrets.EC2_PRIVATE_KEY }}
port: ${{ secrets.EC2_PORT }}
source: 'docker-compose.yml'
target: /home/ec2-user
target: /home/${{ secrets.EC2_USERNAME }}

- name: Login to EC2 instance
uses: appleboy/[email protected]
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,20 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build, tag, and push docker image
run: |
docker build --platform linux/amd64 -t ${{ secrets.DOCKER_USERNAME }}/${{env.DOCKERHUB_IMAGE_NAME}}:latest .
docker push ${{ secrets.DOCKER_USERNAME }}/${{env.DOCKERHUB_IMAGE_NAME}}:latest
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/${{env.DOCKERHUB_IMAGE_NAME}}:latest

- name: Rename docker compose config file
run: mv docker-compose.ci.yml docker-compose.yml
Expand All @@ -43,7 +53,7 @@ jobs:
key: ${{ secrets.EC2_PRIVATE_KEY }}
port: ${{ secrets.EC2_PORT }}
source: 'docker-compose.yml'
target: /home/ec2-user
target: /home/${{ secrets.EC2_USERNAME }}

- name: Login to EC2 instance
uses: appleboy/[email protected]
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
version: '3.8'

networks:
vention-network:
name: vention-network

services:
postgres:
image: postgres:alpine
Expand All @@ -13,6 +18,8 @@ services:
interval: 5s
timeout: 5s
retries: 10
networks:
- vention-network
volumes:
- ./data:/var/lib/postgresql/data
ports:
Expand All @@ -27,6 +34,8 @@ services:
ports:
- 3000:3000
- 5555:5555
networks:
- vention-network
depends_on:
postgres:
condition: service_healthy
Expand Down

0 comments on commit 6da3356

Please sign in to comment.