This commit is contained in:
2vb 2024-05-29 00:08:16 -07:00
parent 75cf6c3339
commit 5e4cae659e
8 changed files with 11 additions and 6 deletions

View File

@ -3,6 +3,7 @@
!/aid
!/config
!/data
!/discord
!/fortnite
!/handlers

View File

@ -16,14 +16,18 @@ RUN --mount=type=bind \
FROM busybox:1.36-glibc as busybox
FROM gcr.io/distroless/base AS deploy
WORKDIR /app
# Copy binaries from Busybox
COPY --from=busybox /bin /bin
RUN mkdir /app/data
# Copy snow binary and configuration files
COPY --from=builder /snow /app/snow
# Setup user
RUN adduser -D -h /app snow
RUN chown snow /app
COPY --from=builder --chown=snow --chmod=700 /snow /app/snow
RUN adduser -D -h /app snow && \
chown -R snow:snow /app
USER snow
EXPOSE 3000
ENTRYPOINT ["/app/snow"]

View File

@ -77,7 +77,7 @@ func GetCloudStorageConfig(c *fiber.Ctx) error {
func GetAssets(c *fiber.Ctx) error {
fileName := c.Params("fileName")
path := filepath.Join("./data/files", fileName)
path := filepath.Join("./data/", fileName)
_, err := os.Stat(path)
if err != nil {
if os.IsNotExist(err) {