Skip to content

Commit 1bba5d5

Browse files
adjust workflow steps
1 parent cc2c0a2 commit 1bba5d5

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,24 @@ on:
77

88
jobs:
99
build-and-deploy:
10-
runs-on: self-hosted # <-- targets YOUR VM runner
10+
runs-on: self-hosted
1111

1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515

16+
- name: Free Docker space
17+
run: docker system prune -af
18+
19+
- name: Build images
20+
run: docker compose build
21+
1622
- name: Stop old containers
1723
run: docker compose down
1824

1925
- name: Start new containers
2026
run: |
21-
docker compose up --build -d
22-
27+
docker compose up -d
28+
env:
29+
DOCKER_BUILDKIT: 1
30+
COMPOSE_DOCKER_CLI_BUILD: 1

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ services:
2121
context: .
2222
dockerfile: Dockerfile.api
2323
container_name: courstech-api
24+
pull_policy: if_not_present
2425
depends_on:
2526
db:
2627
condition: service_healthy
@@ -38,6 +39,7 @@ services:
3839
args:
3940
BUILD_ENV: Docker
4041
container_name: courstech-web
42+
pull_policy: if_not_present
4143
depends_on:
4244
- api
4345
ports:

0 commit comments

Comments
 (0)