chore(tazblog): Remove files from ye olde times
This commit is contained in:
parent
85dbb4cc23
commit
47f2145b5b
11 changed files with 0 additions and 227 deletions
|
@ -1,19 +0,0 @@
|
|||
FROM fpco/stack-build
|
||||
MAINTAINER Vincent Ambo <dev@tazj.in>
|
||||
|
||||
# Cache dependencies
|
||||
ADD stack.yaml tazblog.cabal /opt/tazblog/
|
||||
WORKDIR /opt/tazblog
|
||||
RUN stack build --only-dependencies
|
||||
|
||||
# Base setup
|
||||
VOLUME /var/tazblog
|
||||
EXPOSE 8000 8070
|
||||
ENV PATH /root/.local/bin:$PATH
|
||||
|
||||
# Build blog
|
||||
ADD . /opt/tazblog
|
||||
RUN stack install && cp /root/.local/bin/tazblog* /usr/bin/
|
||||
|
||||
# Done!
|
||||
CMD tazblog
|
|
@ -1,17 +0,0 @@
|
|||
VERSION=$(shell bash -c "grep -P -o -e '\d\.\d$$' TazBlog.cabal | head -n1")
|
||||
ARCH_PKG=arch/tazblog-$(VERSION)-1-x86_64.pkg.tar.xz
|
||||
export ARCH_PKG
|
||||
|
||||
all: archpkg docker
|
||||
|
||||
archpkg: $(ARCH_PKG)
|
||||
|
||||
$(ARCH_PKG):
|
||||
cd arch && makepkg
|
||||
|
||||
docker: archpkg
|
||||
cat Dockerfile.raw | envsubst > Dockerfile; \
|
||||
docker build -t tazjin/tazblog .
|
||||
|
||||
clean:
|
||||
rm -rf dist arch/*.pkg.tar.xz arch/pkg arch/src arch/*. Dockerfile
|
|
@ -1 +0,0 @@
|
|||
* Bootstrap: http://twitter.github.com/bootstrap/index.html
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
tar cf backup.tar BlogState/
|
|
@ -1,26 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: tazblog-db
|
||||
spec:
|
||||
selector:
|
||||
app: tazblog-db
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: tazblog-db
|
||||
spec:
|
||||
containers:
|
||||
- image: tazjin/tazblog-haskell:master
|
||||
name: tazblog-db
|
||||
command: ["tazblog-db"]
|
||||
ports:
|
||||
- containerPort: 8070
|
||||
volumeMounts:
|
||||
- name: tazblog-state
|
||||
mountPath: /var/tazblog
|
||||
volumes:
|
||||
- name: tazblog-state
|
||||
gcePersistentDisk:
|
||||
pdName: tazblog-state
|
||||
fsType: ext4
|
|
@ -1,12 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: tazblog-db
|
||||
labels:
|
||||
app: tazblog-db
|
||||
spec:
|
||||
selector:
|
||||
app: tazblog-db
|
||||
ports:
|
||||
- port: 8070
|
||||
name: tazblog-db
|
|
@ -1,45 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: tazblog-5.1.3
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
app: tazblog
|
||||
version: v5.1.3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: tazblog
|
||||
version: v5.1.3
|
||||
spec:
|
||||
containers:
|
||||
- image: tazjin/tazblog-haskell:master
|
||||
imagePullPolicy: Always
|
||||
name: tazblog
|
||||
command: ["tazblog", "--dbHost", "tazblog-db.default.svc.cluster.local"]
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
- image: tazjin/varnish
|
||||
imagePullPolicy: Always
|
||||
name: tazblog-varnish
|
||||
ports:
|
||||
- containerPort: 6081
|
||||
- containerPort: 6082
|
||||
- image: tazjin/hitch:master
|
||||
imagePullPolicy: Always
|
||||
name: tazblog-hitch
|
||||
command: ["hitch", "--backend=[127.0.0.1]:6083", "--write-proxy", "--user=hitch", "/etc/hitch/ssl/tazblog-tls"]
|
||||
ports:
|
||||
- containerPort: 8443
|
||||
volumeMounts:
|
||||
- name: tazblog-tls
|
||||
readOnly: true
|
||||
mountPath: /etc/hitch/ssl
|
||||
resources:
|
||||
requests:
|
||||
memory: "1024Mi"
|
||||
volumes:
|
||||
- name: tazblog-tls
|
||||
secret:
|
||||
secretName: tazblog-tls
|
|
@ -1,17 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: tazblog
|
||||
labels:
|
||||
app: tazblog
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: tazblog
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 6081
|
||||
name: tazblog-http
|
||||
- port: 443
|
||||
targetPort: 8443
|
||||
name: tazblog-https
|
|
@ -1,12 +0,0 @@
|
|||
# For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md
|
||||
|
||||
resolver: lts-9.20
|
||||
packages:
|
||||
- '.'
|
||||
extra-deps:
|
||||
- acid-state-0.14.3
|
||||
- ixset-1.0.7
|
||||
- rss-3000.2.0.6
|
||||
- syb-with-class-0.6.1.8
|
||||
flags: {}
|
||||
extra-package-dbs: []
|
|
@ -1,16 +0,0 @@
|
|||
FROM centos:7
|
||||
MAINTAINER Vincent Ambo <hej@tazj.in>
|
||||
|
||||
EXPOSE 6081 6082 6083
|
||||
|
||||
RUN yum install -y epel-release && \
|
||||
rpm --nosignature -i https://repo.varnish-cache.org/redhat/varnish-4.1.el7.rpm && \
|
||||
yum install -y varnish
|
||||
|
||||
ADD default.vcl /etc/varnish/default.vcl
|
||||
|
||||
CMD ulimit -n 131072 && \
|
||||
/usr/sbin/varnishd -F -f /etc/varnish/default.vcl \
|
||||
-a :6081 -T :6082 -a :6083,PROXY -t 120 \
|
||||
-p thread_pool_min=5 -p thread_pool_max=500\
|
||||
-p thread_pool_timeout=300
|
|
@ -1,60 +0,0 @@
|
|||
vcl 4.0;
|
||||
import std;
|
||||
|
||||
# By default, Varnish will run on the same servers as the blog. Inside of
|
||||
# Kubernetes this will be inside the same pod.
|
||||
|
||||
backend default {
|
||||
.host = "localhost";
|
||||
.port = "8000";
|
||||
}
|
||||
|
||||
# Purge requests should be accepted from localhost
|
||||
acl purge {
|
||||
"localhost";
|
||||
}
|
||||
|
||||
sub vcl_recv {
|
||||
# Allow HTTP PURGE from ACL above
|
||||
if (req.method == "PURGE" && client.ip ~ purge) {
|
||||
return (purge);
|
||||
}
|
||||
|
||||
# Don't cache admin page
|
||||
if (req.url ~ "^/admin") {
|
||||
return (pass);
|
||||
}
|
||||
|
||||
# Redirect non-www to www and non-HTTPS to HTTPS
|
||||
if (req.http.host ~ "^tazj.in" || std.port(local.ip) == 6081) {
|
||||
return (synth (750, ""));
|
||||
}
|
||||
}
|
||||
|
||||
sub vcl_backend_response {
|
||||
# Cache everything for at least 1 minute.
|
||||
if (beresp.ttl < 1m) {
|
||||
set beresp.ttl = 1m;
|
||||
}
|
||||
}
|
||||
|
||||
sub vcl_deliver {
|
||||
# Add an HSTS header to everything
|
||||
set resp.http.Strict-Transport-Security = "max-age=31536000;includeSubdomains;preload";
|
||||
|
||||
if (obj.hits > 0) {
|
||||
set resp.http.X-Cache = "HIT";
|
||||
} else {
|
||||
set resp.http.X-Cache = "MISS";
|
||||
}
|
||||
}
|
||||
|
||||
sub vcl_synth {
|
||||
# Execute TLS or www. redirect
|
||||
if (resp.status == 750) {
|
||||
set resp.http.Location = "https://www.tazj.in" + req.url;
|
||||
set resp.http.Strict-Transport-Security = "max-age=31536000;includeSubdomains;preload";
|
||||
set resp.status = 301;
|
||||
return (deliver);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue