Compare commits
3 Commits
6a633ec2eb
...
73cad693a1
Author | SHA1 | Date | |
---|---|---|---|
73cad693a1 | |||
acc4e3f324 | |||
7b5af1e979 |
@@ -9,6 +9,7 @@ variables:
|
|||||||
CI_HUB_USERNAME: rehashedsalt
|
CI_HUB_USERNAME: rehashedsalt
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
|
- test
|
||||||
- push
|
- push
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
@@ -19,6 +20,7 @@ before_script:
|
|||||||
after_script:
|
after_script:
|
||||||
- docker logout hub.docker.com
|
- docker logout hub.docker.com
|
||||||
|
|
||||||
|
# BUILD
|
||||||
Build:
|
Build:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
@@ -31,6 +33,15 @@ Build:
|
|||||||
.
|
.
|
||||||
- docker push $CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
|
- 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:
|
Push_When_Tag:
|
||||||
stage: push
|
stage: push
|
||||||
only:
|
only:
|
||||||
@@ -47,8 +58,7 @@ Push_When_Tag:
|
|||||||
$CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
|
$CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
|
||||||
$CI_HUB_USERNAME/$CI_PROJECT_NAME:latest
|
$CI_HUB_USERNAME/$CI_PROJECT_NAME:latest
|
||||||
- docker push $CI_HUB_USERNAME/$CI_PROJECT_NAME:latest
|
- docker push $CI_HUB_USERNAME/$CI_PROJECT_NAME:latest
|
||||||
|
Push_Bleeding:
|
||||||
Push_Latest:
|
|
||||||
stage: push
|
stage: push
|
||||||
script:
|
script:
|
||||||
- docker pull $CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
|
- docker pull $CI_HUB_USERNAME/$CI_PROJECT_NAME:$CI_COMMIT_SHORT_SHA
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
FROM php:7-apache
|
FROM php:7-apache
|
||||||
COPY ./ /var/www/html/
|
COPY ./ /var/www/html/
|
||||||
|
RUN mkdir /var/www/html/files
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
10
README.md
10
README.md
@@ -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.
|
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
|
## Random Subtitles
|
||||||
|
|
||||||
|
10
deploy.sh
10
deploy.sh
@@ -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
|
|
||||||
|
|
Reference in New Issue
Block a user