Compare commits
3 Commits
6a633ec2eb
...
73cad693a1
Author | SHA1 | Date | |
---|---|---|---|
73cad693a1 | |||
acc4e3f324 | |||
7b5af1e979 |
@@ -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
|
||||
|
@@ -1,3 +1,4 @@
|
||||
FROM php:7-apache
|
||||
COPY ./ /var/www/html/
|
||||
RUN mkdir /var/www/html/files
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
|
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