Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkStrendin committed Sep 26, 2023
0 parents commit 9580ad1
Show file tree
Hide file tree
Showing 7 changed files with 791 additions and 0 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/build-container-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: ContainerBuild

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
branches: [ main, master ]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Set current date as env variable
run: echo "IMAGETIMESTAMP=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV

- name: Checkout repository
uses: actions/checkout@v3

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
latest
${{ env.IMAGETIMESTAMP }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Send notification to Teams
uses: toko-bifrost/[email protected]
if: always()
with:
github-token: ${{ github.token }}
webhook-uri: ${{ secrets.MSTEAMS_WEBHOOK }}
show-on-start: false
show-on-exit: true
card-layout-exit: complete
custom-facts: |
- name: Build Tag
value: ${{ env.IMAGETIMESTAMP }}
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM nginx:latest
COPY ./wwwroot /wwwroot
COPY ./nginx.conf /etc/nginx/nginx.conf
RUN chown -R nginx:nginx /var/cache/nginx && \
chown -R nginx:nginx /var/log/nginx && \
chown -R nginx:nginx /etc/nginx/conf.d
RUN touch /var/run/nginx.pid && \
chown -R nginx:nginx /var/run/nginx.pid
USER nginx:nginx
41 changes: 41 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
user nginx;
worker_processes auto;

error_log /dev/stdout info;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout;

sendfile off;
tcp_nopush on;

keepalive_timeout 65;

# Turn off the bloody buffering to temp files
proxy_buffering off;

# These two should be the same or nginx will start writing
# large request bodies to temp files
client_body_buffer_size 10m;
client_max_body_size 10m;

server {
listen 8080;
server_name _;
location / {
root /wwwroot;
index index.html;
}
}
}
211 changes: 211 additions & 0 deletions wwwroot/css/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
body {
margin: 0;
padding: 10px;
font-family: sans-serif;;
background-color: #FFFFFF; /* 5f82b1 */
}

.page_container {
max-width: 800px;
margin-left: auto;
margin-right: auto;
text-align: center;
}

.environment {
margin-top: 15px;
text-align: left;
border: 3px solid #0066eb;
border-radius: 10px;
box-sizing: border-box;
background-color: white;
-webkit-box-shadow: 0px 0px 16px -6px #000000;
box-shadow: 0px 0px 16px -6px #000000;
}


.page_title {
margin-top: 25px;
font-size: 30px;
font-weight: bold;
}

.environment_title {
background-color: #0066eb;
padding: 5px;
font-size: 23px;
color: white;
font-weight: bold;
}

.prod_button_text {
font-weight: bold;
padding: 10px;
color: white;
}


.environment_selector_area {
padding: 10px;
margin: 25px;
display: flex;
justify-content: center;
flex-wrap: wrap;
}

.environment_selector_button {
min-width: 200px;
max-width: 300px;
margin: 10px;
font-size: 10pt;
text-align: center;
border-radius: 15px;
}


.environment_selector_button a {
font-size: 10pt;
font-weight: bold;
text-decoration: none;
color: #055fc0;
}

.environment_selector_button img {
width: 100px;
height: 100px;
opacity: 70%;
padding-bottom: 10px;
}

.environment_selector_button img:hover {
opacity: 100%;
}

li {
margin-bottom: 5px;
}

.quick_link_button {
width: 175px;
max-width: 175px;
margin: 10px;
font-size: 10pt;
text-align: center;
border-radius: 15px;
padding: 10px;
}

.quick_link_button a {
font-size: 10pt;
font-weight: bold;
text-decoration: none;
color: #055fc0;
}


.quick_link_button img {
width: 75px;
height: 75px;
opacity: 80%;
padding-bottom: 10px;
}


@media only screen and (max-width: 800px) {
.section_container {
width: 100%;
padding: 0;
}

.hidden_on_small_screens {
display: none;
background: magenta;
}

.column_33 {
width: 100% !important;
}

.column_66 {
width: 100% !important;
}

.article_text {
width: 100%;
}
}

.logo {
height: 135px;
margin: 10px;
vertical-align: middle;
max-width: 400px;
}

.quick_link_section {
margin: 25px;
padding: 10px;
display: flex;
justify-content: space-evenly;
flex-wrap: wrap;
}

.info_section {
text-align: left;
overflow: hidden;
width: 100%;
font-size: 14pt;
}


.flex {
display: flex;
justify-content: center;
flex-wrap: wrap;
}

hr {
border: 0;
border-top: 1px solid rgba(0,0,0,0.2)
}

.column_33 {
float: left;
width: 30%;
margin: 0;
padding: 0;
}

.column_66 {
float: left;
width: 66%;
margin: 0;
padding: 0;
}

@media only screen and (max-width: 400px) {
.lssd_logo {
width: 100px;
height: 110px;
padding: 0;
}


.environment_title {
text-align: center;
}
}

li {
padding-bottom: 0.3em;;
}

.big {
display: block;
font-size: 150%;
}

.article_text {
font-size: 12pt;
text-align: left;
}
Loading

0 comments on commit 9580ad1

Please sign in to comment.