Skip to content

Commit c40534b

Browse files
authored
fix: prop tree build (#74)
1 parent 65c0181 commit c40534b

File tree

3 files changed

+33
-14
lines changed

3 files changed

+33
-14
lines changed

.github/workflows/build-and-push.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ jobs:
6969
type=raw,value=latest,enable={{is_default_branch}}
7070
type=raw,value=${{ steps.package-version.outputs.version }}
7171
72-
- name: Build and push
72+
- name: Build and push property-base
73+
if: matrix.package == 'property-base'
7374
uses: docker/build-push-action@v5
7475
with:
7576
context: .
@@ -80,6 +81,25 @@ jobs:
8081
cache-from: type=gha,scope=${{ matrix.package }}
8182
cache-to: type=gha,mode=max,scope=${{ matrix.package }}
8283

84+
- name: Build and push property-tree
85+
if: matrix.package == 'property-tree'
86+
uses: docker/build-push-action@v5
87+
with:
88+
build-args: |
89+
VITE_API_URL=http://property-base
90+
VITE_CORE_API_URL=http://core
91+
VITE_KEYCLOAK_URL=https://auth-test.mimer.nu/realms/onecore-test
92+
VITE_KEYCLOAK_CLIENT_ID=onecore-test
93+
VITE_KEYCLOAK_REDIRECT_URI=https://property-tree-test.mimer.nu/callback
94+
VITE_KEYCLOAK_REALM=onecore-test
95+
context: .
96+
file: ./packages/${{ matrix.package }}/Dockerfile
97+
push: true
98+
tags: ${{ steps.meta.outputs.tags }}
99+
labels: ${{ steps.meta.outputs.labels }}
100+
cache-from: type=gha,scope=${{ matrix.package }}
101+
cache-to: type=gha,mode=max,scope=${{ matrix.package }}
102+
83103
commit-version:
84104
needs: [build-and-push, determine-version]
85105
runs-on: ubuntu-latest

packages/property-tree/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ COPY ./package*.json /app/
77

88
COPY ./packages/property-tree /app/packages/property-tree
99

10+
ARG VITE_CORE_API_URL
11+
ARG VITE_KEYCLOAK_URL
12+
ARG VITE_KEYCLOAK_CLIENT_ID
13+
ARG VITE_KEYCLOAK_REDIRECT_URI
14+
ARG VITE_KEYCLOAK_REALM
15+
16+
ENV VITE_CORE_API_URL=${VITE_CORE_API_URL}
17+
ENV VITE_KEYCLOAK_URL=${VITE_KEYCLOAK_URL}
18+
ENV VITE_KEYCLOAK_CLIENT_ID=${VITE_KEYCLOAK_CLIENT_ID}
19+
ENV VITE_KEYCLOAK_REDIRECT_URI=${VITE_KEYCLOAK_REDIRECT_URI}
20+
ENV VITE_KEYCLOAK_REALM=${VITE_KEYCLOAK_REALM}
21+
1022
# Install dependencies
1123
RUN npm ci --workspace packages/property-tree
1224

packages/property-tree/nginx.conf

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,6 @@ server {
1717
proxy_cache_bypass $http_upgrade;
1818
}
1919

20-
# API proxy to property-base service
21-
location /core/api/ {
22-
proxy_pass http://core:80/;
23-
proxy_http_version 1.1;
24-
proxy_set_header Upgrade $http_upgrade;
25-
proxy_set_header Connection 'upgrade';
26-
proxy_set_header Host $host;
27-
proxy_set_header X-Real-IP $remote_addr;
28-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
29-
proxy_set_header X-Forwarded-Proto $scheme;
30-
proxy_cache_bypass $http_upgrade;
31-
}
32-
3320
# Handle Single Page Application routing
3421
location / {
3522
try_files $uri $uri/ /index.html;

0 commit comments

Comments
 (0)