-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Dockerfile, support for default ADIF_URL and TITLE
- Loading branch information
robertlestak
committed
Oct 27, 2024
1 parent
fc0b117
commit 16441ed
Showing
7 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM nginx | ||
|
||
WORKDIR /usr/share/nginx/html | ||
|
||
ARG ADIF_URL | ||
ENV ADIF_URL=${ADIF_URL} | ||
ARG TITLE | ||
ENV TITLE=${TITLE} | ||
ARG BRAND | ||
ENV BRAND=${BRAND} | ||
|
||
COPY . /usr/share/nginx/html | ||
|
||
RUN bash scripts/build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: qso-mapper | ||
namespace: default | ||
labels: | ||
app: qso-mapper | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: qso-mapper | ||
template: | ||
metadata: | ||
labels: | ||
app: qso-mapper | ||
spec: | ||
containers: | ||
- name: qso-mapper | ||
image: registry.example.com/qso-mapper:latest | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 80 | ||
name: http | ||
resources: | ||
requests: | ||
memory: "64Mi" | ||
cpu: "250m" | ||
limits: | ||
memory: "128Mi" | ||
cpu: "500m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: qso-mapper | ||
namespace: default | ||
labels: | ||
app: qso-mapper | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: qso-mapper | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
if [[ ! -z "$ADIF_URL" ]]; then | ||
cp index.html index.html.bak && \ | ||
sed -e "s,let ADIF_URL = '';,let ADIF_URL = '$ADIF_URL';," \ | ||
index.html > index.html.tmp && \ | ||
mv index.html.tmp index.html | ||
fi | ||
|
||
if [[ ! -z "$TITLE" ]]; then | ||
cp index.html index.html.bak && \ | ||
sed -e "s,<title>QSO/ADIF Mapper<\/title>,<title>$TITLE<\/title>," \ | ||
index.html > index.html.tmp && \ | ||
mv index.html.tmp index.html | ||
fi | ||
|
||
if [[ ! -z "$BRAND" ]]; then | ||
cp index.html index.html.bak && \ | ||
sed -e "s,QSO Mapper,$BRAND," \ | ||
index.html > index.html.tmp && \ | ||
mv index.html.tmp index.html | ||
fi |