fix: caddy setup in dockerfile
This commit is contained in:
@@ -18,9 +18,10 @@ WORKDIR /usr/share/caddy
|
|||||||
# Copy built static files from the builder stage
|
# Copy built static files from the builder stage
|
||||||
COPY --from=builder /app/dist .
|
COPY --from=builder /app/dist .
|
||||||
|
|
||||||
# Expose the port Caddy will listen on
|
# Copy our local Caddyfile config
|
||||||
|
COPY Caddyfile /etc/caddy/Caddyfile
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Start Caddy as a file server with SPA support
|
# Start caddy using the config file
|
||||||
# It serves files from the current dir and redirects unknown paths to index.html
|
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
|
||||||
CMD ["caddy", "file-server", "--listen", ":3000", "--try-files", "index.html"]
|
|
||||||
|
|||||||
Reference in New Issue
Block a user