Update
This commit is contained in:
parent
75cf6c3339
commit
5e4cae659e
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
!/aid
|
!/aid
|
||||||
!/config
|
!/config
|
||||||
|
!/data
|
||||||
!/discord
|
!/discord
|
||||||
!/fortnite
|
!/fortnite
|
||||||
!/handlers
|
!/handlers
|
||||||
|
|
14
Dockerfile
14
Dockerfile
|
@ -16,14 +16,18 @@ RUN --mount=type=bind \
|
||||||
FROM busybox:1.36-glibc as busybox
|
FROM busybox:1.36-glibc as busybox
|
||||||
FROM gcr.io/distroless/base AS deploy
|
FROM gcr.io/distroless/base AS deploy
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy binaries from Busybox
|
|
||||||
COPY --from=busybox /bin /bin
|
COPY --from=busybox /bin /bin
|
||||||
|
|
||||||
|
RUN mkdir /app/data
|
||||||
|
|
||||||
|
# Copy snow binary and configuration files
|
||||||
|
COPY --from=builder /snow /app/snow
|
||||||
|
|
||||||
# Setup user
|
# Setup user
|
||||||
RUN adduser -D -h /app snow
|
RUN adduser -D -h /app snow && \
|
||||||
RUN chown snow /app
|
chown -R snow:snow /app
|
||||||
COPY --from=builder --chown=snow --chmod=700 /snow /app/snow
|
|
||||||
|
USER snow
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
ENTRYPOINT ["/app/snow"]
|
ENTRYPOINT ["/app/snow"]
|
|
@ -77,7 +77,7 @@ func GetCloudStorageConfig(c *fiber.Ctx) error {
|
||||||
|
|
||||||
func GetAssets(c *fiber.Ctx) error {
|
func GetAssets(c *fiber.Ctx) error {
|
||||||
fileName := c.Params("fileName")
|
fileName := c.Params("fileName")
|
||||||
path := filepath.Join("./data/files", fileName)
|
path := filepath.Join("./data/", fileName)
|
||||||
_, err := os.Stat(path)
|
_, err := os.Stat(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user