Skip to content

Commit 68edbcd

Browse files
authored
Merge pull request #7477 from hmxlabs/7476-Reorg-Docker-Images
#7476 Reorganise and fix docker image creation
2 parents 853639e + 905c785 commit 68edbcd

3 files changed

Lines changed: 47 additions & 16 deletions

File tree

.github/workflows/maven-dual-build.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ jobs:
9595
uses: docker/metadata-action@v3
9696
with:
9797
images: ghcr.io/${{ github.repository }}
98-
flavor: latest=true
98+
flavor: latest=false
9999
tags: |
100-
type=ref,event=tag,enable=${{ github.ref_type == 'tag' }}
100+
type=raw,value=latest,enable=${{ github.ref_type == 'tag' }}
101+
type=raw,value=${{ github.ref_name }},enable=${{ github.ref_type == 'tag' }}
101102
type=raw,value=postgres-${{ github.ref_name }},enable=${{ github.ref_type == 'tag' }}
102103
type=raw,value=postgres
103104
@@ -229,7 +230,7 @@ jobs:
229230

230231
- name: Login to GitHub Registry
231232
if: ${{ github.ref_type == 'tag' }}
232-
uses: docker/login-action@v1
233+
uses: docker/login-action@v3
233234
with:
234235
registry: ghcr.io
235236
username: ${{ github.actor }}
@@ -238,20 +239,20 @@ jobs:
238239
- name: Docker meta
239240
if: ${{ github.ref_type == 'tag' }}
240241
id: meta
241-
uses: docker/metadata-action@v3
242+
uses: docker/metadata-action@v5
242243
with:
243244
images: ghcr.io/${{ github.repository }}
244-
flavor: latest=true
245+
flavor: latest=false
245246
tags: |
246-
type=ref,event=tag,enable=${{ github.ref_type == 'tag' }}
247247
type=raw,value=mssql-alt-${{ github.ref_name }},enable=${{ github.ref_type == 'tag' }}
248248
type=raw,value=mssql-alt
249249
250250
- name: Build and push Docker image
251251
if: ${{ github.ref_type == 'tag' }}
252-
uses: docker/build-push-action@v2
252+
uses: docker/build-push-action@v6
253253
with:
254254
context: .
255+
file: Dockerfile.mssql
255256
push: ${{ github.ref_type == 'tag' }}
256257
labels: ${{ steps.meta.outputs.labels }}
257258
tags: ${{ steps.meta.outputs.tags }}

docker-compose-mssql.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
services:
2-
waltz:
3-
build:
4-
context: .
5-
dockerfile: Dockerfile.mssql
2+
waltz-mssql:
3+
image: ghcr.io/finos/waltz:mssql-alt
4+
# build:
5+
# context: .
6+
# dockerfile: Dockerfile.mssql
67
ports:
78
- "8080:8080"
89
depends_on:
9-
- sqlserver
10+
sqlserver:
11+
condition: service_healthy
1012
environment:
1113
DB_HOST: sqlserver
1214
DB_PORT: "1433"
@@ -28,6 +30,17 @@ services:
2830
SA_PASSWORD: "Waltz#123"
2931
ACCEPT_EULA: "Y"
3032
MSSQL_PID: "Express"
33+
volumes:
34+
- waltz_mssqldata:/var/opt/mssql
35+
healthcheck:
36+
test: /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P "Waltz#123" -Q "SELECT 1" || exit 1
37+
interval: 10s
38+
timeout: 5s
39+
retries: 30
40+
start_period: 30s
41+
42+
volumes:
43+
waltz_mssqldata:
3144

3245
# example run commands
3346
# docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Waltz#123" -e "MSSQL_PID=Express" -p 1433:1433 -d --name=sql mcr.microsoft.com/mssql/server:latest

docker-compose.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
services:
2-
waltz:
3-
image: ghcr.io/finos/waltz:latest
2+
waltz-postgres:
3+
image: ghcr.io/finos/waltz:postgres
4+
# build:
5+
# context: .
6+
# dockerfile: Dockerfile
47
ports:
58
- "8080:8080"
69
depends_on:
7-
- postgres
10+
postgres:
11+
condition: service_healthy
12+
restart: unless-stopped
813

914
postgres:
1015
image: postgres:16
@@ -13,4 +18,16 @@ services:
1318
POSTGRES_DB: waltz
1419
POSTGRES_PASSWORD: waltz
1520
ports:
16-
- 5432:5432
21+
- 5432:5432
22+
volumes:
23+
- waltz_pgdata:/var/lib/postgresql/data
24+
restart: unless-stopped
25+
healthcheck:
26+
test: pg_isready -U waltz -d waltz
27+
interval: 10s
28+
timeout: 5s
29+
retries: 30
30+
start_period: 10s
31+
32+
volumes:
33+
waltz_pgdata:

0 commit comments

Comments
 (0)