Skip to content

Commit ad8b65a

Browse files
authored
Proxy image (#27)
* op: replace volume mounts by seperate docker container for proxy, move ipb logo to get rid of * op: adapt deployment for container registry to new seperate proxy container
2 parents 0cace00 + 619dae9 commit ad8b65a

7 files changed

Lines changed: 82 additions & 22 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build and publish Docker proxy image
2+
3+
on:
4+
workflow_dispatch
5+
6+
env:
7+
REGISTRY: ghcr.io
8+
SELECTZYME_VERSION: 0.0.5
9+
IMAGE_NAME: ${{ github.repository }}
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
contents: read
17+
packages: write
18+
id-token: write
19+
20+
steps:
21+
- name: Check out repository
22+
uses: actions/checkout@v5
23+
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v3
26+
27+
- name: Log into registry ${{ env.REGISTRY }}
28+
uses: docker/login-action@v3
29+
with:
30+
registry: ${{ env.REGISTRY }}
31+
username: ${{ github.actor }}
32+
password: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Extract Docker metadata
35+
id: meta
36+
uses: docker/metadata-action@v5
37+
with:
38+
images: |
39+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40+
tags:
41+
type=raw,value=${{ env.SELECTZYME_VERSION }}
42+
labels: |
43+
org.opencontainers.image.url=${{ github.server_url }}/${{ github.repository }}
44+
org.opencontainers.image.title=selectzyme-proxy
45+
org.opencontainers.image.description=SelectZyme Web Application proxy
46+
org.opencontainers.image.licenses=MIT
47+
org.opencontainers.image.version=${{ env.SELECTZYME_VERSION }}
48+
49+
- name: Build and push Docker proxy image
50+
uses: docker/build-push-action@v6
51+
with:
52+
context: ./nginx
53+
# target: final # if there is a staged building process
54+
push: true
55+
tags: ${{ steps.meta.outputs.tags }}
56+
labels: ${{ steps.meta.outputs.labels }}
57+
no-cache: true

.github/workflows/docker-publish.yml renamed to .github/workflows/docker-publish-selectzyme-app.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: Build and publish Docker image
1+
name: Build and publish Docker selectzyme image
22

33
on:
44
workflow_dispatch
55

66
env:
77
REGISTRY: ghcr.io
8-
SELECTZYME_VERSION: 0.0.4
8+
SELECTZYME_VERSION: 0.0.5
99
IMAGE_NAME: ${{ github.repository }}
1010

1111
jobs:
@@ -46,7 +46,7 @@ jobs:
4646
org.opencontainers.image.licenses=MIT
4747
org.opencontainers.image.version=${{ env.SELECTZYME_VERSION }}
4848
49-
- name: Build and push Docker image
49+
- name: Build and push Docker selectzyme image
5050
uses: docker/build-push-action@v6
5151
with:
5252
context: .

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ Because of a restricted company network, images (github: packages) are build usi
6565
```mermaid
6666
sequenceDiagram
6767
actor User
68-
participant BP as Biocloud Proxy
69-
participant SDP as Selectzyme Demo Proxy (nginx)
70-
participant SDA as Selectzyme Demo App
68+
participant BP as Infrastructure Proxy
69+
participant SDP as Proxy (nginx)
70+
participant SDA as Selectzyme App
7171
7272
User->>+BP: Request resource
7373
BP->>+SDP: Forward request (e.g., to selectzyme-proxy.selectzyme-network)
74-
SDP->>+SDA: Proxy request to Selectzyme Demo App
74+
SDP->>+SDA: Proxy request to Selectzyme App
7575
SDA-->>-SDP: App response
7676
SDP-->>-BP: Forward response
7777
BP-->>-User: Response

docker-compose.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
services:
22
selectzyme-proxy:
3-
image: nginx:alpine
3+
image: ghcr.io/ipb-halle/selectzyme-proxy:0.0.5 # from docker.publish-proxy.yml org.opencontainers.image.title=selectzyme-proxy
44
# Port forwarding disabled for production runs (profiles or docker-compose.override.yml can be used alternatively)
5-
#ports:
6-
# - "80:80"
7-
volumes:
8-
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
9-
- ./nginx/index.html:/usr/share/nginx/html/selectzyme/index.html
10-
- ./nginx/bootstrap.min.css:/usr/share/nginx/html/selectzyme/bootstrap.min.css
11-
- ./assets/:/usr/share/nginx/html/selectzyme/assets/
5+
# ports:
6+
# - "80:80"
127
depends_on:
138
- selectzyme-demo
149
- selectzyme-petase
@@ -20,47 +15,47 @@ services:
2015
- selectzyme-network
2116

2217
selectzyme-demo:
23-
image: ghcr.io/ipb-halle/selectzyme-app:0.0.4
18+
image: ghcr.io/ipb-halle/selectzyme-app:0.0.5
2419
environment:
2520
- DASH_URL_BASE_PATHNAME=/selectzyme/demo/
2621
- SELECTZYME_DATASET=demo
2722
networks:
2823
- selectzyme-network
2924

3025
selectzyme-petase:
31-
image: ghcr.io/ipb-halle/selectzyme-app:0.0.4
26+
image: ghcr.io/ipb-halle/selectzyme-app:0.0.5
3227
environment:
3328
- DASH_URL_BASE_PATHNAME=/selectzyme/petase/
3429
- SELECTZYME_DATASET=petase
3530
networks:
3631
- selectzyme-network
3732

3833
selectzyme-ired:
39-
image: ghcr.io/ipb-halle/selectzyme-app:0.0.4
34+
image: ghcr.io/ipb-halle/selectzyme-app:0.0.5
4035
environment:
4136
- DASH_URL_BASE_PATHNAME=/selectzyme/ired/
4237
- SELECTZYME_DATASET=ired
4338
networks:
4439
- selectzyme-network
4540

4641
selectzyme-lpor:
47-
image: ghcr.io/ipb-halle/selectzyme-app:0.0.4
42+
image: ghcr.io/ipb-halle/selectzyme-app:0.0.5
4843
environment:
4944
- DASH_URL_BASE_PATHNAME=/selectzyme/lpor/
5045
- SELECTZYME_DATASET=lpor
5146
networks:
5247
- selectzyme-network
5348

5449
selectzyme-lov:
55-
image: ghcr.io/ipb-halle/selectzyme-app:0.0.4
50+
image: ghcr.io/ipb-halle/selectzyme-app:0.0.5
5651
environment:
5752
- DASH_URL_BASE_PATHNAME=/selectzyme/lov/
5853
- SELECTZYME_DATASET=lov
5954
networks:
6055
- selectzyme-network
6156

6257
selectzyme-fmos:
63-
image: ghcr.io/ipb-halle/selectzyme-app:0.0.4
58+
image: ghcr.io/ipb-halle/selectzyme-app:0.0.5
6459
environment:
6560
- DASH_URL_BASE_PATHNAME=/selectzyme/fmos/
6661
- SELECTZYME_DATASET=fmos

nginx/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM nginx:alpine
2+
3+
COPY default.conf /etc/nginx/conf.d/default.conf
4+
COPY index.html /usr/share/nginx/html/selectzyme/index.html
5+
COPY bootstrap.min.css /usr/share/nginx/html/selectzyme/bootstrap.min.css
6+
COPY ipb-logo.png /usr/share/nginx/html/selectzyme/ipb-logo.png
7+
8+
# CMD and ENTRYPOINT are inherited from the base image, so we don't need to specify them here unless we want to override them.

nginx/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</head>
88
<body class="bg-light">
99
<div class="container py-5">
10-
<img src="assets/ipb-logo.png" alt="IPB Logo" style="position: absolute; top: 20px; right: 20px; height: 50px;" />
10+
<img src="ipb-logo.png" alt="IPB Logo" style="position: absolute; top: 20px; right: 20px; height: 50px;" />
1111

1212
<h1 class="mb-4">SelectZyme Analysis Dashboard</h1>
1313
<p>Select a dataset below to explore the analysis results:</p>

nginx/ipb-logo.png

33.7 KB
Loading

0 commit comments

Comments
 (0)