-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
103 additions
and
3 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 @@ | ||
node_modules |
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 |
---|---|---|
|
@@ -23,3 +23,54 @@ jobs: | |
|
||
- name: Code Linting | ||
run: npm run lint | ||
|
||
build: | ||
name: Build | ||
if: github.ref == 'refs/heads/main' && success() | ||
needs: linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login Github Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: scrumlr.io - Landing Page - Build | ||
id: meta-landing-page | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
ghcr.io/inovex/scrumlr.io-landing-page/image | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=raw,value=latest | ||
type=sha,prefix=sha-,format=short | ||
labels: | | ||
[email protected] | ||
org.opencontainers.image.url=https://github.com/inovex/scrumlr.io/pkgs/container/scrumlr.io-landing-page%2Fimage | ||
org.opencontainers.image.source=https://github.com/inovex/scrumlr.io-landing-page | ||
org.opencontainers.image.vendor=inovex | ||
org.opencontainers.image.licenses=MIT | ||
org.opencontainers.image.title=scrumlr.io - Landing Page | ||
org.opencontainers.image.description=The landing page of scrumlr.io | ||
- name: Set up Docker buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Push landing page image | ||
id: push-landing-page | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
tags: ${{ steps.meta-landing-page.outputs.tags }} | ||
labels: ${{ steps.meta-landing-page.outputs.labels }} | ||
build-args: | | ||
DIRECTUS_URL=${{ secrets.DIRECTUS_URL }} | ||
DIRECTUS_TOKEN=${{ secrets.DIRECTUS_TOKEN }} |
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,17 @@ | ||
FROM node:18 AS build | ||
WORKDIR /app | ||
ARG DIRECTUS_URL | ||
ARG DIRECTUS_TOKEN | ||
COPY package*.json ./ | ||
RUN npm install -g pnpm | ||
RUN pnpm install | ||
COPY . . | ||
RUN echo "DIRECTUS_URL = ${DIRECTUS_URL}" >> .env | ||
RUN echo "DIRECTUS_TOKEN = ${DIRECTUS_TOKEN}" >> .env | ||
RUN pnpm run build | ||
RUN rm -rf .env | ||
|
||
FROM nginx:alpine AS runtime | ||
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf | ||
COPY --from=build /app/dist /usr/share/nginx/html | ||
EXPOSE 8080 |
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,31 @@ | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
server { | ||
listen 8080; | ||
server_name _; | ||
|
||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
include /etc/nginx/mime.types; | ||
|
||
gzip on; | ||
gzip_min_length 1000; | ||
gzip_proxied expired no-cache no-store private auth; | ||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; | ||
|
||
error_page 404 /404.html; | ||
location = /404.html { | ||
root /usr/share/nginx/html; | ||
internal; | ||
} | ||
|
||
location / { | ||
try_files $uri $uri/index.html =404; | ||
} | ||
} | ||
} |
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