Skip to content

Commit

Permalink
chore: add docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
tituschewxj committed Oct 8, 2024
1 parent 65f0d57 commit 9ef96f3
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Docker Compose Pipeline

on:
push:
branches:
- main
- staging
pull_request:
branches:
- main
- staging

jobs:
test:
runs-on: ubuntu-latest

services:
docker:
image: docker:19.03.12
options: --privileged
ports:
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Compose
run: sudo apt-get update && sudo apt-get install docker-compose -y

- name: Build and Run Services
run: docker-compose up --build -d

- name: Wait for services to be ready
run: sleep 10 # this is the estimated service startup time

- name: Run Tests
run: |
curl --fail http://localhost:3000 # Adjust based on the app
# You can add more tests here

0 comments on commit 9ef96f3

Please sign in to comment.