Add console + marketing site to Docker Compose and build-push
- Console: nginx SPA on port 3010, image reg.dd0c.net/dd0c-console - Marketing: nginx static on port 3011, image reg.dd0c.net/dd0c-marketing - Dockerfiles + .dockerignore for both - build-push.sh updated to include console + marketing targets
This commit is contained in:
@@ -23,6 +23,8 @@ declare -A CONTEXTS=(
|
||||
["dd0c-portal"]="04-lightweight-idp"
|
||||
["dd0c-cost"]="05-aws-cost-anomaly"
|
||||
["dd0c-run"]="06-runbook-automation/saas"
|
||||
["dd0c-console"]="console"
|
||||
["dd0c-marketing"]="marketing/site"
|
||||
)
|
||||
|
||||
# If args provided, filter to those services
|
||||
@@ -34,12 +36,12 @@ if [ $# -gt 0 ]; then
|
||||
TARGETS+=("$key")
|
||||
else
|
||||
echo -e "${RED}Unknown service: $arg${NC}" >&2
|
||||
echo "Available: drift alert portal cost run" >&2
|
||||
echo "Available: drift alert portal cost run console marketing" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
else
|
||||
TARGETS=("dd0c-drift" "dd0c-alert" "dd0c-portal" "dd0c-cost" "dd0c-run")
|
||||
TARGETS=("dd0c-drift" "dd0c-alert" "dd0c-portal" "dd0c-cost" "dd0c-run" "dd0c-console" "dd0c-marketing")
|
||||
fi
|
||||
|
||||
# Login to registry
|
||||
|
||||
3
products/console/.dockerignore
Normal file
3
products/console/.dockerignore
Normal file
@@ -0,0 +1,3 @@
|
||||
node_modules/
|
||||
dist/
|
||||
.env
|
||||
@@ -207,6 +207,24 @@ services:
|
||||
postgres: { condition: service_healthy }
|
||||
redis: { condition: service_healthy }
|
||||
|
||||
# dd0c Console (React SPA)
|
||||
console:
|
||||
image: reg.dd0c.net/dd0c-console:latest
|
||||
build:
|
||||
context: ./console
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "3010:80"
|
||||
|
||||
# dd0c Marketing Site (Astro)
|
||||
marketing:
|
||||
image: reg.dd0c.net/dd0c-marketing:latest
|
||||
build:
|
||||
context: ./marketing/site
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "3011:80"
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
meili_data:
|
||||
|
||||
3
products/marketing/site/.dockerignore
Normal file
3
products/marketing/site/.dockerignore
Normal file
@@ -0,0 +1,3 @@
|
||||
node_modules/
|
||||
dist/
|
||||
.env
|
||||
11
products/marketing/site/Dockerfile
Normal file
11
products/marketing/site/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
FROM node:22-slim AS build
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user