This repository has been archived by the owner on Apr 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit 3c9b6e7
Showing
10 changed files
with
1,207 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,59 @@ | ||
# Define the default behavior where GitHub attempts to detect the file type and set the line endings correctly | ||
* text=auto | ||
|
||
# Define line endings to be unix (LF) for GitHub files | ||
.gitattributes text eol=lf | ||
.gitignore text eol=lf | ||
.gitconfig text eol=lf | ||
LICENSE text eol=lf | ||
*.md text eol=lf | ||
|
||
# Define line endings to be unix (LF) for source code | ||
*.php text eol=lf | ||
*.css text eol=lf | ||
*.sass text eol=lf | ||
*.scss text eol=lf | ||
*.less text eol=lf | ||
*.styl text eol=lf | ||
*.js text eol=lf | ||
*.coffee text eol=lf | ||
*.json text eol=lf | ||
*.htm text eol=lf | ||
*.html text eol=lf | ||
*.xml text eol=lf | ||
*.svg text eol=lf | ||
*.txt text eol=lf | ||
*.ini text eol=lf | ||
*.inc text eol=lf | ||
*.pl text eol=lf | ||
*.rb text eol=lf | ||
*.py text eol=lf | ||
*.scm text eol=lf | ||
*.sql text eol=lf | ||
*.sh text eol=lf | ||
*.bat text eol=lf | ||
*.txt text eol=lf | ||
*.tmpl text eol=lf | ||
Dockerfile text eol=lf | ||
|
||
# Define binary files to be excluded from modification | ||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.ico binary | ||
*.flv binary | ||
*.fla binary | ||
*.swf binary | ||
*.gz binary | ||
*.tar binary | ||
*.rar binary | ||
*.zip binary | ||
*.7z binary | ||
*.egg binary | ||
*.ttf binary | ||
*.eot binary | ||
*.woff binary | ||
*.pyc binary | ||
*.pdf binary | ||
*.db binary |
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,78 @@ | ||
name: docker-manual-triggered-test | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tags: | ||
description: 'Enter tag name for test/dev image' | ||
default: 'test' | ||
|
||
jobs: | ||
gcr-dockerhub-build-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Update runc (temporary fix) # TODO: Remove step when https://github.com/actions/virtual-environments/issues/2658 fixed | ||
uses: nick-invision/retry@v2.4.0 | ||
with: | ||
timeout_minutes: 60 | ||
max_attempts: 3 | ||
retry_wait_seconds: 120 | ||
retry_on: error | ||
command: | | ||
sudo apt-get install libseccomp-dev | ||
git clone https://github.com/opencontainers/runc | ||
cd runc | ||
make | ||
sudo make install | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.CR_PAT }} | ||
- name: Show Runners environment (debug) | ||
uses: nick-invision/retry@v2.4.0 | ||
with: | ||
timeout_minutes: 60 | ||
max_attempts: 3 | ||
retry_wait_seconds: 120 | ||
retry_on: error | ||
command: | | ||
export | ||
- name: Build Docker image and tag | ||
uses: nick-invision/retry@v2.4.0 | ||
with: | ||
timeout_minutes: 60 | ||
max_attempts: 3 | ||
retry_wait_seconds: 120 | ||
retry_on: error | ||
command: | | ||
docker build \ | ||
--tag ${{ github.repository }}:${{ github.event.inputs.tags }} \ | ||
--tag ghcr.io/${{ github.repository }}:${{ github.event.inputs.tags }} \ | ||
. | ||
- name: Push Docker image to Docker Hub | ||
uses: nick-invision/retry@v2.4.0 | ||
with: | ||
timeout_minutes: 60 | ||
max_attempts: 3 | ||
retry_wait_seconds: 120 | ||
retry_on: error | ||
command: | | ||
docker push ${{ github.repository }}:${{ github.event.inputs.tags }} | ||
- name: Push Docker image to GitHub Container Registry (GHCR) | ||
uses: nick-invision/retry@v2.4.0 | ||
with: | ||
timeout_minutes: 60 | ||
max_attempts: 3 | ||
retry_wait_seconds: 120 | ||
retry_on: error | ||
command: | | ||
docker push ghcr.io/${{ github.repository }}:${{ github.event.inputs.tags }} |
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,94 @@ | ||
name: docker-tag-triggered-prod | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
gcr-dockerhub-build-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Update runc (temporary fix) # TODO: Remove step when https://github.com/actions/virtual-environments/issues/2658 fixed | ||
uses: nick-invision/retry@v2.4.0 | ||
with: | ||
timeout_minutes: 60 | ||
max_attempts: 3 | ||
retry_wait_seconds: 120 | ||
retry_on: error | ||
command: | | ||
sudo apt-get install libseccomp-dev | ||
git clone https://github.com/opencontainers/runc | ||
cd runc | ||
make | ||
sudo make install | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to GitHub Container Registry (GHCR) | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.CR_PAT }} | ||
- name: Show Runners environment (debug) | ||
uses: nick-invision/retry@v2.4.0 | ||
with: | ||
timeout_minutes: 60 | ||
max_attempts: 3 | ||
retry_wait_seconds: 120 | ||
retry_on: error | ||
command: | | ||
export | ||
- name: Identify GitHub tag name | ||
uses: nick-invision/retry@v2.4.0 | ||
with: | ||
timeout_minutes: 60 | ||
max_attempts: 3 | ||
retry_wait_seconds: 120 | ||
retry_on: error | ||
# get tag name from runners environment 'GITHUB_REF' and then use bash substring | ||
# to strip out '+' symbol - required due to gcr not supporting this as a tag | ||
# name (docker hub does support it). | ||
# note if push is NOT triggered by tag then 'GITHUB_REF' will be the branch name. | ||
command: | | ||
echo "##[set-output name=tag;]$(tag_name=${GITHUB_REF#refs/tags/} && echo "${tag_name//+/-}")" | ||
id: identify_tag | ||
- name: Build Docker image and tag | ||
uses: nick-invision/retry@v2.4.0 | ||
with: | ||
timeout_minutes: 60 | ||
max_attempts: 3 | ||
retry_wait_seconds: 120 | ||
retry_on: error | ||
command: | | ||
docker build \ | ||
--tag ${{ github.repository }}:latest \ | ||
--tag ${{ github.repository }}:${{ steps.identify_tag.outputs.tag }} \ | ||
--tag ghcr.io/${{ github.repository }}:latest \ | ||
--tag ghcr.io/${{ github.repository }}:${{ steps.identify_tag.outputs.tag }} \ | ||
. | ||
- name: Push Docker image to Docker Hub | ||
uses: nick-invision/retry@v2.4.0 | ||
with: | ||
timeout_minutes: 60 | ||
max_attempts: 3 | ||
retry_wait_seconds: 120 | ||
retry_on: error | ||
command: | | ||
docker push ${{ github.repository }}:latest | ||
docker push ${{ github.repository }}:${{ steps.identify_tag.outputs.tag }} | ||
- name: Push Docker image to GitHub Container Registry (GHCR) | ||
uses: nick-invision/retry@v2.4.0 | ||
with: | ||
timeout_minutes: 60 | ||
max_attempts: 3 | ||
retry_wait_seconds: 120 | ||
retry_on: error | ||
command: | | ||
docker push ghcr.io/${{ github.repository }}:latest | ||
docker push ghcr.io/${{ github.repository }}:${{ steps.identify_tag.outputs.tag }} |
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,15 @@ | ||
# ignore comments files | ||
todo.txt | ||
notes.txt | ||
|
||
# ignore mac generated files | ||
.DS_Store | ||
|
||
# ignore pycharm ide | ||
.idea | ||
|
||
# ignore compiled python scripts | ||
*.pyc | ||
|
||
# ignore virtual env | ||
venv |
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,42 @@ | ||
FROM binhex/arch-base:latest | ||
MAINTAINER binhex | ||
|
||
# additional files | ||
################## | ||
|
||
# add supervisor conf file for app | ||
ADD build/*.conf /etc/supervisor/conf.d/ | ||
|
||
# add install bash script | ||
ADD build/root/*.sh /root/ | ||
|
||
# add run bash script | ||
ADD run/nobody/*.sh /home/nobody/ | ||
|
||
# install app | ||
############# | ||
|
||
# make executable and run bash scripts to install app | ||
RUN chmod +x /root/*.sh && \ | ||
/bin/bash /root/install.sh | ||
|
||
# docker settings | ||
################# | ||
|
||
# map /config to host defined config path (used to store configuration from app) | ||
VOLUME /config | ||
|
||
# expose port for minecraft | ||
EXPOSE 25565 | ||
|
||
# expose port for minecraft | ||
EXPOSE 19132/udp | ||
|
||
# expose port for crafty web ui | ||
EXPOSE 8000 | ||
|
||
# set permissions | ||
################# | ||
|
||
# run script to set uid, gid and permissions | ||
CMD ["/bin/bash", "/usr/local/bin/init.sh"] |
Oops, something went wrong.