Skip to content

Commit 68afb04

Browse files
Create docker-compose.yml
1 parent 86829e7 commit 68afb04

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Docker Compose CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v2
18+
19+
- name: Setup Docker Compose
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y docker-compose-plugin
23+
24+
- name: Build and start containers
25+
run: docker compose up -d --build
26+
27+
- name: Wait for application to start
28+
run: sleep 10
29+
30+
- name: Test the application
31+
run: |
32+
curl http://localhost:3000 || exit 1
33+
34+
- name: Stop containers
35+
if: always()
36+
run: docker compose down

0 commit comments

Comments
 (0)