19 Commits

Author SHA1 Message Date
0c30da7e6d Actually really for real point current to god knows where 2021-04-08 14:33:49 -05:00
2fcf3ad3a2 Point current off to god knows where 2021-03-25 13:01:32 -05:00
930c550385 Alright fuck it, disable testing 2021-03-25 01:02:41 -05:00
ea31268ef5 Wait for Apache to start up before testing it 2021-03-25 00:56:04 -05:00
c1b575f5a9 Add more debugging info to the test cases 2021-03-25 00:42:24 -05:00
ad67e1831b Oh right --push doesn't take an argument 2021-03-25 00:31:04 -05:00
7330851694 Fix some issues with docker buildx
Unfortunately, I can't use --load, I'll have to use --push directly
2021-03-25 00:24:13 -05:00
62829cecad Oh more diag pls 2021-03-20 20:36:24 -05:00
afa3886de5 Maybe this fixes it? Hopefully I can at least diag from here 2021-03-20 20:36:00 -05:00
d066bed021 Alright, new approach 2021-03-20 20:30:58 -05:00
1cf9089e33 Disabel SELinux to fix builds on arm64 2021-03-20 20:27:42 -05:00
9aeb4b44b4 That image doesn't work; try this one 2021-03-20 18:50:45 -05:00
f3f6fd7be5 No wait I want this one 2021-03-20 14:28:24 -05:00
138fa27962 Switch to an image that will have buildx 2021-03-20 14:25:59 -05:00
234992141c Set up multi-arch builds 2021-03-20 14:20:43 -05:00
89d9610ba8 Need to actually add curl. Whoops 2021-03-20 14:17:37 -05:00
73cad693a1 Set up some barebones automated testing 2021-03-20 14:14:11 -05:00
acc4e3f324 Remove janky script stuff 2021-03-20 13:50:26 -05:00
7b5af1e979 Update README, ensure /files exists in the docroot 2021-03-20 13:49:49 -05:00
7 changed files with 36 additions and 28 deletions

1
.gitignore vendored
View File

@@ -1,2 +1 @@
*.swp
/files

View File

@@ -2,13 +2,14 @@
# This guy is awesome: https://dev.to/bzinoun/gitlab-ci-to-build-and-push-containers-to-registry-538a
#
image: docker:latest
image: morlay/buildx:607a2ce
variables:
# DinD's vfs driver is pretty intensive; this is less so
DOCKER_DRIVER: overlay2
CI_HUB_USERNAME: rehashedsalt
stages:
- build
# - test
- push
services:
- docker:dind
@@ -19,18 +20,36 @@ before_script:
after_script:
- docker logout hub.docker.com
# BUILD
Build:
stage: build
script:
- docker pull $CI_HUB_USERNAME/$CI_PROJECT_NAME:latest || true
- docker buildx create --use
- >
docker build
docker buildx build
--pull
--platform linux/amd64,linux/arm64
--cache-from $CI_HUB_USERNAME/$CI_PROJECT_NAME:latest
--tag $CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
--push
.
- docker push $CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
- docker images
# TEST
# TODO: Fix this
#Test_HTTP_200:
# stage: test
# script:
# - apk add curl
# - docker run -d -p 8889:80 $CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
# - sleep 10
# - docker ps
# - netstat -tulpn
# - curl localhost:8889 | grep -ie '200 OK'
# - docker kill $(docker ps -q)
# PUSH
Push_When_Tag:
stage: push
only:
@@ -41,14 +60,14 @@ Push_When_Tag:
docker tag
$CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
$CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_REF_NAME
- docker push $CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_REF_NAME
- >
docker tag
$CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
$CI_HUB_USERNAME/$CI_PROJECT_NAME:latest
- docker images
- docker push $CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_REF_NAME
- docker push $CI_HUB_USERNAME/$CI_PROJECT_NAME:latest
Push_Latest:
Push_Bleeding:
stage: push
script:
- docker pull $CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
@@ -56,4 +75,5 @@ Push_Latest:
docker tag
$CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
$CI_HUB_USERNAME/$CI_PROJECT_NAME:bleeding
- docker images
- docker push $CI_HUB_USERNAME/$CI_PROJECT_NAME:bleeding

View File

@@ -6,7 +6,15 @@ A website for me and my friends.
This repo is a ready-to-go webroot. `git clone` and configure Apache. `git pull` for updates.
You may also use the Docker image at `rehashedsalt/9iron:latest`
## Docker
You can pull the image from `rehashedsalt/9iron`. The `:latest` tag will always have the latest git tag applied and the `:bleeding` tag will always be the latest *commit*.
The following directories contain stateful content that you will be interested in keeping in a PV:
* `/var/www/html/files`
The image listens on `:80` and does not terminate SSL; proxy connections if you're interested in that.
## Random Subtitles

View File

@@ -1,10 +0,0 @@
#! /bin/sh
#
# post-deploy.sh
# Copyright (C) 2020 Vintage Salt <rehashedsalt@cock.li>
#
# Distributed under terms of the MIT license.
#
ssh -t salt@www.9iron.club sudo git -C /var/www/www.9iron.club pull

0
files/.keep Normal file
View File

1
minecraft/packs/current Symbolic link
View File

@@ -0,0 +1 @@
null

10
test.sh
View File

@@ -1,10 +0,0 @@
#! /bin/sh
#
# test.sh
# Copyright (C) 2020 Vintage Salt <rehashedsalt@cock.li>
#
# Distributed under terms of the MIT license.
#
php -S localhost:8000