Compare commits

...

10 Commits

Author SHA1 Message Date
0847d58bda Added build stuff 2021-02-10 09:43:10 +00:00
b77c3f8e89 Cleaned up 2021-02-10 08:17:57 +00:00
eb0384471c fin 2021-02-09 13:50:11 +00:00
4d77dd93d1 More analytics 2021-02-09 13:44:16 +00:00
dd75df19c3 Updated analytics section 2021-02-09 11:09:16 +00:00
ee497b0ecc Started analytics section 2021-02-08 15:46:52 +00:00
2922857646 Added smart home stuff 2021-02-08 05:43:19 +00:00
ab7c725827 update 2021-02-08 04:32:23 +00:00
2c98f306c4 Updates 2021-02-07 20:14:41 +00:00
c0ec952684 Began personal infra slides 2021-02-05 21:40:11 +00:00
7 changed files with 418 additions and 15 deletions

View File

@ -16,3 +16,4 @@ lerna-debug.log*
.vscode
*.code-workspace
.history/
Dockerfile

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM node:14-alpine AS builder
WORKDIR /app
RUN npm install -g @marp-team/marp-cli
ADD . .
RUN find . -maxdepth 2 -mindepth 2 -name "*.md" -not -name "README.md" -print0 | xargs -0 marp {} \;
RUN mkdir -p out && \
find . -maxdepth 2 -mindepth 2 -name "*.html" -exec mv {} ./out/ \;
FROM nginx:stable-alpine
ENV NGINX_ENTRYPOINT_QUIET_LOGS=1
COPY --from=builder /app/out/* /usr/share/nginx/html/
ADD index.html /usr/share/nginx/html/index.html
RUN echo "server { listen 80; server_name localhost; location / { root /usr/share/nginx/html; index index.html; rewrite ^/([a-zA-Z0-9\-_]+)/?$ /\$1.html last; } }" > /etc/nginx/conf.d/default.conf

View File

@ -1,6 +1,6 @@
.DEFAULT_GOAL := default
IMAGE ?= docker.cluster.fun/private/talks:latest
IMAGE ?= docker.cluster.fun/averagemarcus/talks:latest
.PHONY: test # Run all tests, linting and format checks
test: lint check-format run-tests
@ -33,17 +33,11 @@ run-tests:
.PHONY: fetch-deps # Fetch all project dependencies
fetch-deps:
@echo "⚠️ 'fetch-deps' unimplemented"
# GO Projects
# @go mod tidy
# Node Projects
# @npm install
@npm install -g @marp-team/marp-cli
.PHONY: build # Build the project
build: lint check-format fetch-deps
@echo "⚠️ 'build' unimplemented"
# GO Projects
# @go build -o PROJECT_NAME main.go
@find . -maxdepth 2 -mindepth 2 -name "*.md" -not -name "README.md" -print0 | xargs -0 marp {} \;
.PHONY: docker-build # Build the docker image
docker-build:
@ -54,12 +48,8 @@ docker-publish:
@docker push $(IMAGE)
.PHONY: run # Run the application
run:
@echo "⚠️ 'run' unimplemented"
# GO Projects
# @go run main.go
# Node Projects
# @npm start
run: docker-build
@docker run --rm -it -p 8080:80 $(IMAGE)
.PHONY: ci # Perform CI specific tasks to perform on a pull request
ci:

1
PersonalInfrastructure/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.html

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
# Personal Infrastructure
A casual talk given at [Not JSOxford](https://not.jsoxford.com/) on 10th February 2021 about my personal infrastructure setup, my smart home devices and how I make use of Kubernetes for a bunch of stuff.

33
index.html Normal file
View File

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Talks</title>
<style>
body {
display: flex;
flex-direction: column;
text-align: center;
font-size: 2em;
font-family: monospace;
background-color: gainsboro;
}
a {
color: tomato !important;
}
</style>
</head>
<body>
<h1>Marcus Noble - Talks</h1>
<figure>
<iframe src="/PersonalInfrastructure" width="500px" height="300px"></iframe>
<figcaption>
<a href="/PersonalInfrastructure">Personal Infrastructure</a>
</figcaption>
</figure>
</body>
</html>