all repos — homestead @ 74c1044c84ab0d1d1ed6c1edbce6b655da9bfc93

Code for my website

Steamline docker build

Alan Pearce
commit

74c1044c84ab0d1d1ed6c1edbce6b655da9bfc93

parent

26a50c9f45de958cbaba7c8597424c34617a37b5

2 files changed, 7 insertions(+), 4 deletions(-)

jump to
M DockerfileDockerfile
@@ -48,7 +48,9 @@
RUN apk add --no-cache prettier@testing make fd brotli gzip zstd COPY --link Makefile ./ -COPY --from=ssg /web ./ +COPY --from=ssg /web/config.toml ./ +COPY --from=ssg /web/content content +COPY --from=ssg /web/public public RUN make -j4 format compress
@@ -56,8 +58,9 @@ # Final stage for app image
FROM base # Copy built application +COPY config.toml /app/ COPY --from=build /app /app -COPY --from=postprocess /web/ /app/website +COPY --from=postprocess /web/public /app/public # Start the server by default, this can be overwritten at runtime EXPOSE 3000
M src/index.tssrc/index.ts
@@ -8,8 +8,8 @@ import readConfig from "./config";
Sentry.init({}); -const base = "./website/"; -const publicDir = path.resolve(base, "public") + path.sep; +const base = "."; +const publicDir = path.resolve(base, "website") + path.sep; const config = readConfig(base); const defaultHeaders = {