Add marketing service to docker-compose configuration
This commit is contained in:
21
frontend/Caddyfile.marketing
Normal file
21
frontend/Caddyfile.marketing
Normal file
@@ -0,0 +1,21 @@
|
||||
:8020 {
|
||||
# Enable compression
|
||||
encode gzip zstd
|
||||
|
||||
# Set root to built files
|
||||
root * /usr/share/caddy
|
||||
|
||||
# Authenticated app served under /app (if needed in future)
|
||||
handle_path /app* {
|
||||
uri strip_prefix /app
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
|
||||
# Marketing site is the public default
|
||||
handle {
|
||||
try_files {path} /marketing.html
|
||||
file_server
|
||||
}
|
||||
}
|
||||
|
||||
24
frontend/Dockerfile.marketing
Normal file
24
frontend/Dockerfile.marketing
Normal file
@@ -0,0 +1,24 @@
|
||||
# Marketing Site Dockerfile
|
||||
# Builds and serves the marketing website in a container
|
||||
FROM node:18-alpine AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Build marketing site
|
||||
RUN npm run build:marketing
|
||||
|
||||
# Stage 2: Serve with Caddy
|
||||
FROM caddy:latest
|
||||
COPY --from=builder /app/dist /usr/share/caddy
|
||||
COPY Caddyfile.marketing /etc/caddy/Caddyfile
|
||||
EXPOSE 8020
|
||||
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile"]
|
||||
|
||||
Reference in New Issue
Block a user