Skip to content

Commit 84e8179

Browse files
initial commit
1 parent 6dd9475 commit 84e8179

15 files changed

+194
-1
lines changed

.github/workflows/docker.yml

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Docker
2+
3+
# This workflow uses actions that are not certified by GitHub.
4+
# They are provided by a third-party and are governed by
5+
# separate terms of service, privacy policy, and support
6+
# documentation.
7+
8+
on:
9+
push:
10+
branches: [ "main" ]
11+
# Publish semver tags as releases.
12+
tags: [ 'v*.*.*' ]
13+
pull_request:
14+
branches: [ "main" ]
15+
16+
env:
17+
# Use docker.io for Docker Hub if empty
18+
REGISTRY: ghcr.io
19+
# github.repository as <account>/<repo>
20+
IMAGE_NAME: ${{ github.repository }}
21+
22+
23+
jobs:
24+
build:
25+
26+
runs-on: ubuntu-latest
27+
permissions:
28+
contents: read
29+
packages: write
30+
# This is used to complete the identity challenge
31+
# with sigstore/fulcio when running outside of PRs.
32+
id-token: write
33+
34+
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@v3
37+
38+
# Install the cosign tool except on PR
39+
# https://github.com/sigstore/cosign-installer
40+
- name: Install cosign
41+
if: github.event_name != 'pull_request'
42+
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1
43+
with:
44+
cosign-release: 'v2.1.1'
45+
46+
# Set up BuildKit Docker container builder to be able to build
47+
# multi-platform images and export cache
48+
# https://github.com/docker/setup-buildx-action
49+
- name: Set up Docker Buildx
50+
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
51+
52+
# Login against a Docker registry except on PR
53+
# https://github.com/docker/login-action
54+
- name: Log into registry ${{ env.REGISTRY }}
55+
if: github.event_name != 'pull_request'
56+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
57+
with:
58+
registry: ${{ env.REGISTRY }}
59+
username: ${{ github.actor }}
60+
password: ${{ secrets.GITHUB_TOKEN }}
61+
62+
# Extract metadata (tags, labels) for Docker
63+
# https://github.com/docker/metadata-action
64+
- name: Extract Docker metadata
65+
id: meta
66+
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
67+
with:
68+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
69+
70+
# Build and push Docker image with Buildx (don't push on PR)
71+
# https://github.com/docker/build-push-action
72+
- name: Build and push Docker image
73+
id: build-and-push
74+
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
75+
with:
76+
context: .
77+
push: ${{ github.event_name != 'pull_request' }}
78+
tags: ${{ steps.meta.outputs.tags }}
79+
labels: ${{ steps.meta.outputs.labels }}
80+
cache-from: type=gha
81+
cache-to: type=gha,mode=max
82+
83+
# Sign the resulting Docker image digest except on PRs.
84+
# This will only write to the public Rekor transparency log when the Docker
85+
# repository is public to avoid leaking data. If you would like to publish
86+
# transparency data even for private images, pass --force to cosign below.
87+
# https://github.com/sigstore/cosign
88+
- name: Sign the published Docker image
89+
if: false # TODO signing currently causes errors
90+
# if: ${{ github.event_name != 'pull_request' }}
91+
env:
92+
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
93+
TAGS: ${{ steps.meta.outputs.tags }}
94+
DIGEST: ${{ steps.build-and-push.outputs.digest }}
95+
# This step uses the identity token to provision an ephemeral certificate
96+
# against the sigstore community Fulcio instance.
97+
run: echo "${TAGS}" | xargs -I {} cosign sign --yes --force {}@${DIGEST}

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "frontend"]
2+
path = frontend
3+
url = https://github.com/grossherzogin-elisabeth/eventplanner-frontend
4+
[submodule "backend"]
5+
path = backend
6+
url = https://github.com/grossherzogin-elisabeth/eventplanner-backend

Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# build frontend
2+
FROM node:20.12.2 as frontend-builder
3+
WORKDIR /builder
4+
COPY ./frontend .
5+
RUN npm install && npm run build
6+
7+
# build backend
8+
FROM eclipse-temurin:21-jdk-alpine AS backend-builder
9+
WORKDIR /builder
10+
COPY ./backend .
11+
COPY --from=frontend-builder /builder/dist/ ./src/main/resources/static/
12+
RUN ./gradlew build
13+
14+
# combine frontend and backend
15+
FROM eclipse-temurin:21-jdk-alpine
16+
WORKDIR /app
17+
COPY --from=backend-builder /builder/build/libs/*.jar eventplanner.jar
18+
ENTRYPOINT ["java","-XX:+UseContainerSupport","-jar","/app/eventplanner.jar"]

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
# eventplanner
1+
# Lissi Eventplanner
2+
3+
The Lissi eventplanner is a webapp for planning sailing legs.
4+
5+
## Required parameters:
6+
- `AUTH_ISSUER_URI`: URI of the OAuth provider, e.g. https://login.microsoftonline.com/<tenant-id>/v2.0
7+
- `AUTH_CLIENT_ID`: OAuth Client ID
8+
- `AUTH_CLIENT_SECRET`: OAuth Client Secret

backend

Submodule backend added at 60880f2

data/positions/backschaft.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"key": "backschaft",
3+
"name": "Backschafter:in",
4+
"substitutes": [],
5+
"color": "#c084fc",
6+
"prio": 0
7+
}

data/positions/deckshand.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"key": "deckshand",
3+
"name": "Deckshand",
4+
"substitutes": [],
5+
"color": "#4ade80",
6+
"prio": 1
7+
}

data/positions/kapitaen.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"key": "kapitaen",
3+
"name": "Kapitän:in",
4+
"substitutes": ["steuermann"],
5+
"color": "#78716c",
6+
"prio": 9
7+
}

data/positions/koch.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"key": "koch",
3+
"name": "Kombüse",
4+
"substitutes": [],
5+
"color": "#eab308",
6+
"prio": 5
7+
}

data/positions/leichtmatrose.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"key": "leichtmatrose",
3+
"name": "Leichtmatrose:in",
4+
"substitutes": ["deckshand"],
5+
"color": "#38bdf8",
6+
"prio": 2
7+
}

data/positions/maschinist.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"key": "maschinist",
3+
"name": "Maschinist:in",
4+
"substitutes": [],
5+
"color": "#fed7aa",
6+
"prio": 6
7+
}

data/positions/matrose.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"key": "matrose",
3+
"name": "Matrose:in",
4+
"substitutes": ["deckshand", "leichtmatrose"],
5+
"color": "#fdba74",
6+
"prio": 3
7+
}

data/positions/noa.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"key": "noa",
3+
"name": "NOA",
4+
"substitutes": [],
5+
"color": "#78716c",
6+
"prio": 7
7+
}

data/positions/steuermann.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"key": "steuermann",
3+
"name": "Steuermann:frau",
4+
"substitutes": [],
5+
"color": "#78716c",
6+
"prio": 8
7+
}

frontend

Submodule frontend added at dde172b

0 commit comments

Comments
 (0)