Skip to content

Commit b75ca1b

Browse files
committed
Minify and cleanup
1 parent 6efa5f1 commit b75ca1b

8 files changed

+29
-126
lines changed

.mergify.yml

-7
This file was deleted.

Dockerfile

+10-4
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,18 @@ RUN apt-get update \
1313
&& apt-get clean \
1414
&& rm -rf /var/lib/apt/lists/*
1515

16+
1617
WORKDIR /resume
17-
COPY . /resume/
18+
COPY resume.tex .
1819
RUN pdflatex resume.tex
1920

20-
FROM nginx:1.15.7-alpine
21-
COPY --from=builder /resume/resume.pdf /usr/share/nginx/html
22-
COPY nginx.conf /etc/nginx/conf.d/default.conf
21+
FROM golang:1.17-alpine as server
22+
WORKDIR /resume
23+
COPY main.go .
24+
COPY --from=builder /resume/resume.pdf .
25+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-w -s" -o /go/bin/resume main.go
2326

27+
FROM scratch
28+
COPY --from=server /go/bin/resume /usr/local/bin/resume
29+
ENTRYPOINT ["resume"]
2430
EXPOSE 80

Dockerfile.dev

-18
This file was deleted.

Makefile

-53
This file was deleted.

README.md

+4-19
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
11
# resume
2-
This repository has a CI pipeline setup for it which ensures that you can always find my
3-
most up to date version of my resume [here](https://www.aaronbatilo.dev/resume)
2+
This repository has a CI pipeline setup for it which ensures that you can
3+
always find my most up to date version of my resume at
4+
[https://www.aaronbatilo.dev/resume](https://www.aaronbatilo.dev/resume).
5+
46
I wanted to learn how to use LaTeX and resumes seem to be the easiest thing to
57
use it for.
68

79
My resume template is heavily based on
810
[this](https://github.com/sb2nov/resume).
9-
10-
## To update
11-
For ease of generating new resumes, I created a small Dockerfile which contains
12-
all the dependencies needed for converting the .tex file into a pdf, and then
13-
convert the pdf to a png for the preview below.
14-
15-
Along with the Dockerfile, I created a Makefile which has the commands for
16-
using the built Dockerfile.
17-
18-
Just type:
19-
```
20-
make png
21-
```
22-
This will build the Docker image, build the pdf, and build the png all at once.
23-
24-
## Preview
25-
![Resume Screenshot](./resume.png)

main.go

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package main
2+
3+
import (
4+
_ "embed"
5+
"net/http"
6+
)
7+
8+
//go:embed resume.pdf
9+
var resume []byte
10+
11+
func main() {
12+
http.ListenAndServe(":80", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
13+
w.Write(resume)
14+
}))
15+
}

nginx.conf

-25
This file was deleted.

resume.png

-342 KB
Binary file not shown.

0 commit comments

Comments
 (0)