Compare commits
No commits in common. "9f2dbdf27c23b7253c9a639a61909caaebb6415d" and "1a734dbe6db5aae181efe6179134c42ea96743f1" have entirely different histories.
9f2dbdf27c
...
1a734dbe6d
2 changed files with 2 additions and 10 deletions
10
Dockerfile
10
Dockerfile
|
@ -19,19 +19,13 @@ WORKDIR /app
|
|||
# Copy the build directory from the builder stage to /app
|
||||
COPY --from=builder /git/build /app
|
||||
|
||||
# Create a dedicated user 'web' and change ownership of /app to 'web'
|
||||
RUN addgroup -S web && adduser -S web -G web && chown -R web:web /app
|
||||
|
||||
# Caddyfile configuration to serve files from /app
|
||||
RUN echo -e ":80 {\n root * /app\n try_files {path}.html {path}\n file_server\n}\n:8080 {\n respond /health \"OK\" 200\n}" > /etc/caddy/Caddyfile
|
||||
RUN echo -e ":80 {\n root * /app\n try_files {path}.html {path}\n file_server\n}" > /etc/caddy/Caddyfile
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Switch to the 'web' user
|
||||
USER web
|
||||
|
||||
# Start Caddy with the specified Caddyfile as the 'web' user
|
||||
# Start Caddy with the specified Caddyfile
|
||||
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
|
||||
|
||||
# Docker Container Labels
|
||||
|
|
|
@ -7,5 +7,3 @@ services:
|
|||
no_cache: true
|
||||
ports:
|
||||
- "3000:80"
|
||||
- "3080:8080"
|
||||
|
||||
|
|
Loading…
Reference in a new issue