3 Commits

Author SHA1 Message Date
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
5 changed files with 22 additions and 23 deletions

View File

@@ -9,6 +9,7 @@ variables:
CI_HUB_USERNAME: rehashedsalt
stages:
- build
- test
- push
services:
- docker:dind
@@ -19,6 +20,7 @@ before_script:
after_script:
- docker logout hub.docker.com
# BUILD
Build:
stage: build
script:
@@ -31,6 +33,15 @@ Build:
.
- docker push $CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
# TEST
Test_HTTP_200:
stage: test
script:
- docker run -d -p 8889:80 $CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
- curl localhost:8889 | grep -ie '200 OK'
- docker kill $(docker ps -q)
# PUSH
Push_When_Tag:
stage: push
only:
@@ -47,8 +58,7 @@ Push_When_Tag:
$CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
$CI_HUB_USERNAME/$CI_PROJECT_NAME:latest
- 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

View File

@@ -1,3 +1,4 @@
FROM php:7-apache
COPY ./ /var/www/html/
RUN mkdir /var/www/html/files
EXPOSE 80

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

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