diff --git a/.dockerignore b/.dockerignore index aa2f1cc..3f0e80a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -16,3 +16,4 @@ lerna-debug.log* .vscode *.code-workspace .history/ +Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7bbc799 --- /dev/null +++ b/Dockerfile @@ -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 diff --git a/Makefile b/Makefile index c0166f5..2f44e19 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/PersonalInfrastructure/PersonalInfrastructure.md b/PersonalInfrastructure/PersonalInfrastructure.md index 4fdb745..b4a387f 100644 --- a/PersonalInfrastructure/PersonalInfrastructure.md +++ b/PersonalInfrastructure/PersonalInfrastructure.md @@ -1,4 +1,5 @@ --- +title: Personal Infrastructure theme: gaia _class: lead backgroundColor: #fff diff --git a/index.html b/index.html new file mode 100644 index 0000000..7fe0ae2 --- /dev/null +++ b/index.html @@ -0,0 +1,33 @@ + + + + + + Talks + + + +

Marcus Noble - Talks

+ +
+ +
+ Personal Infrastructure +
+
+ + +