Skip to content

Commit 597035c

Browse files
committed
URL change and docker workspace path
1 parent 7ec299b commit 597035c

File tree

4 files changed

+23
-14
lines changed

4 files changed

+23
-14
lines changed

.github/workflows/docker-latex.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
5555
- name: Build pdf using docker image
5656
run: |
57-
docker run --rm -v "$(pwd):/home/porter/app" --name maths --user root --hostname latex latex sh ./deploy.sh --parallel --production --dist-dir="web/dist" --cache-uri="https://maths.nrv.nu/pdf/archive.tar.gz"
57+
docker run --rm -v "$(pwd):/app" --name maths --user root --hostname latex latex sh ./deploy.sh --parallel --production --dist-dir="web/dist" --cache-uri="https://notes.nrv.nu/pdf/archive.tar.gz"
5858
5959
- name: Upload site artifact
6060
uses: actions/upload-pages-artifact@v2

Dockerfile

+15-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
FROM alpine:latest
22

3-
RUN apk update && apk upgrade;\
4-
apk add doas;\
5-
adduser -g 'Porter' porter;\
6-
echo "porter:" | chpasswd;\
7-
adduser porter wheel;\
3+
# Set environment variables for UID and GID (can be passed at runtime)
4+
ARG USER_ID=1000
5+
ARG GROUP_ID=1000
6+
7+
# Update packages and add required utilities
8+
RUN apk update && apk upgrade; \
9+
apk add doas; \
10+
addgroup -g ${GROUP_ID} porter; \
11+
adduser -D -u ${USER_ID} -G porter -g 'Porter' porter; \
12+
echo "porter:" | chpasswd; \
13+
addgroup porter wheel; \
814
echo "permit persist :wheel" > "/etc/doas.d/doas.conf"
915

1016
# Run system config script
@@ -24,18 +30,17 @@ COPY compile.sh /home/porter
2430
RUN chown -R porter /home/porter/.docker &&\
2531
chown porter /home/porter/compile.sh
2632

33+
RUN mkdir -p /app
34+
RUN chown -R porter /app
35+
2736
USER porter
2837
WORKDIR /home/porter
2938

30-
## Set zsh as default shell
31-
#RUN echo "porter:" | chsh -s $(which zsh) porter
32-
3339
# Run setup.sh as porter
3440
RUN sh .docker/setup.sh
3541

3642
# Set final working directory
37-
RUN mkdir -p /home/porter/app
38-
WORKDIR /home/porter/app
43+
WORKDIR /app
3944

4045
CMD ["zsh"]
4146

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Math Notes
1+
# Notes
22

33
Alpine container with LaTeX and neovim installation.
44

@@ -10,12 +10,16 @@ Build docker image.
1010
docker build -t latex .
1111
```
1212

13+
```sh
14+
docker build --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) -t latex .
15+
```
16+
1317
## Run
1418

1519
Start latex docker image.
1620

1721
```sh
18-
docker run -it --rm -v "$(pwd):/home/porter/app" --hostname latex --name maths latex
22+
docker run -it --rm -v "$(pwd):/app" --name maths latex
1923
```
2024

2125
## Python Environment

web/src/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</div>
3737
<div class='fixed bottom-0 right-0 p-4 hover:text-blue-nordic'>
3838
<a class='mx-auto hover:underline hover:text-blue-400 transition-all duration-150 font-light'
39-
href='https://github.com/mnerv/maths'
39+
href='https://github.com/mnerv/notes'
4040
title='Open Github repository'
4141
target='_blank'>
4242
<Icon icon="bi:github" />

0 commit comments

Comments
 (0)