diff options
author | Alan Pearce | 2023-09-15 20:20:57 +0200 |
---|---|---|
committer | Alan Pearce | 2023-09-16 07:33:39 +0200 |
commit | 83d1af3cfbfe4070e5004596865c0b7015f79eff (patch) | |
tree | c19dfeebae537eaa078e58eb51cc7f7581be138d | |
parent | 932915406a6105b93de833c32b9ce6a07ebca6c1 (diff) | |
download | website-83d1af3cfbfe4070e5004596865c0b7015f79eff.tar.lz website-83d1af3cfbfe4070e5004596865c0b7015f79eff.tar.zst website-83d1af3cfbfe4070e5004596865c0b7015f79eff.zip |
Steamline docker build
-rw-r--r-- | Dockerfile | 7 | ||||
-rw-r--r-- | src/index.ts | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile index 4fc6b54..4261ce2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,7 +48,9 @@ RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/a 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 @@ RUN make -j4 format compress 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 diff --git a/src/index.ts b/src/index.ts index ee092f2..3ddbce3 100644 --- a/src/index.ts +++ b/src/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 = { |