Update
This commit is contained in:
parent
75cf6c3339
commit
5e4cae659e
|
@ -3,6 +3,7 @@
|
|||
|
||||
!/aid
|
||||
!/config
|
||||
!/data
|
||||
!/discord
|
||||
!/fortnite
|
||||
!/handlers
|
||||
|
|
14
Dockerfile
14
Dockerfile
|
@ -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"]
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user