Skip to content

Commit

Permalink
Added deployment files
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherJMiller committed Jul 17, 2023
1 parent 5c9670e commit d88f49a
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.github
Dockerfile
.dockerignore
57 changes: 57 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Docker

# 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 ]
pull_request:
types: [opened, synchronize, reopened]

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
steps:
- name: Checkout repository
uses: actions/checkout@v3

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@40891eba8c2bcd1309b07ba8b11232f313e86779
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@c4ee3adeed93b1fa6a762f209fb01608c1a22f1e
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# 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
uses: docker/build-push-action@eafaea8d0f5853934deece2ffa67af59d936562b
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
file: Dockerfile
labels: ${{ steps.meta.outputs.labels }}
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM docker.io/nginx:1-alpine

ADD . /usr/share/nginx/html
ADD nginx.conf /etc/nginx/nginx.conf
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Legacy Realmic.net Portal

This repo acts as a servable archive of an old website that used to be stored at `http://portal.realmic.net`

It contains old games.
26 changes: 26 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
pid /tmp/nginx.pid;

events {
worker_connections 1024;
}

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

sendfile on;

keepalive_timeout 65;

server {
listen 8080;
server_name localhost;
root /usr/share/nginx/html;

location /health {
return 200 'alive';
add_header Content-Type text/plain;
access_log off;
}
}
}

0 comments on commit d88f49a

Please sign in to comment.