diff --git a/samples/django-postgres/app/Dockerfile b/samples/django-postgres/app/Dockerfile index 2f456217..ca3b7aa0 100644 --- a/samples/django-postgres/app/Dockerfile +++ b/samples/django-postgres/app/Dockerfile @@ -1,6 +1,8 @@ # Use an official Python runtime as a parent image FROM python:3.11-slim +RUN apt-get update && apt-get install -y curl + # Set environment variables ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 @@ -19,4 +21,4 @@ COPY . /code/ RUN python manage.py collectstatic --noinput # Start server -CMD python manage.py migrate && python manage.py createsuperuser && gunicorn crm_platform.wsgi:application --bind 0.0.0.0:8000 \ No newline at end of file +CMD python manage.py migrate && python manage.py createsuperuser && gunicorn crm_platform.wsgi:application --bind 0.0.0.0:8000 diff --git a/samples/django/app/Dockerfile b/samples/django/app/Dockerfile index 50589cf4..4c5e17ba 100644 --- a/samples/django/app/Dockerfile +++ b/samples/django/app/Dockerfile @@ -1,6 +1,8 @@ # Use an official Python runtime as a parent image FROM python:3.11-slim +RUN apt-get update && apt-get install -y curl + # Set environment variables ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 diff --git a/samples/golang-http-form/app/Dockerfile b/samples/golang-http-form/app/Dockerfile index cc460603..c2de6b65 100644 --- a/samples/golang-http-form/app/Dockerfile +++ b/samples/golang-http-form/app/Dockerfile @@ -17,9 +17,9 @@ COPY . . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . # Start a new stage from scratch -FROM alpine:latest +FROM golang:1.20-slim -RUN apk --no-cache add ca-certificates +RUN apt update && apt install -y curl ca-certificates WORKDIR /root/ diff --git a/samples/golang-http-form/compose.yaml b/samples/golang-http-form/compose.yaml index acf615c4..7ef95178 100644 --- a/samples/golang-http-form/compose.yaml +++ b/samples/golang-http-form/compose.yaml @@ -12,4 +12,4 @@ services: reservations: memory: 50M healthcheck: - test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/"] + test: ["CMD", "curl", "-f", "http://localhost:8080/"] diff --git a/samples/golang-mongodb-atlas/app/Dockerfile b/samples/golang-mongodb-atlas/app/Dockerfile index 214172dc..defd902d 100644 --- a/samples/golang-mongodb-atlas/app/Dockerfile +++ b/samples/golang-mongodb-atlas/app/Dockerfile @@ -17,7 +17,9 @@ COPY . . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o taskmanager . # Start a new stage from scratch -FROM alpine:latest +FROM golang:1.20-slim + +RUN apt update && apt install -y curl ca-certificates WORKDIR /root/ @@ -30,4 +32,3 @@ EXPOSE 8080 # Command to run the executable CMD ["./taskmanager"] - diff --git a/samples/golang-mongodb-atlas/compose.yaml b/samples/golang-mongodb-atlas/compose.yaml index ddea22cc..98419512 100644 --- a/samples/golang-mongodb-atlas/compose.yaml +++ b/samples/golang-mongodb-atlas/compose.yaml @@ -14,3 +14,5 @@ services: # resources: # reservations: # memory: 256M + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080/"] diff --git a/samples/golang-openai/app/Dockerfile b/samples/golang-openai/app/Dockerfile index cc460603..c2de6b65 100644 --- a/samples/golang-openai/app/Dockerfile +++ b/samples/golang-openai/app/Dockerfile @@ -17,9 +17,9 @@ COPY . . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . # Start a new stage from scratch -FROM alpine:latest +FROM golang:1.20-slim -RUN apk --no-cache add ca-certificates +RUN apt update && apt install -y curl ca-certificates WORKDIR /root/ diff --git a/samples/golang-openai/compose.yaml b/samples/golang-openai/compose.yaml index 7d1a8cdb..0918211a 100644 --- a/samples/golang-openai/compose.yaml +++ b/samples/golang-openai/compose.yaml @@ -14,4 +14,4 @@ services: reservations: memory: 50M healthcheck: - test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/"] + test: ["CMD", "curl", "-f", "http://localhost:8080/"] diff --git a/samples/golang-rest-api/app/Dockerfile b/samples/golang-rest-api/app/Dockerfile index cc460603..c2de6b65 100644 --- a/samples/golang-rest-api/app/Dockerfile +++ b/samples/golang-rest-api/app/Dockerfile @@ -17,9 +17,9 @@ COPY . . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . # Start a new stage from scratch -FROM alpine:latest +FROM golang:1.20-slim -RUN apk --no-cache add ca-certificates +RUN apt update && apt install -y curl ca-certificates WORKDIR /root/ diff --git a/samples/golang-rest-api/compose.yaml b/samples/golang-rest-api/compose.yaml index acf615c4..7ef95178 100644 --- a/samples/golang-rest-api/compose.yaml +++ b/samples/golang-rest-api/compose.yaml @@ -12,4 +12,4 @@ services: reservations: memory: 50M healthcheck: - test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/"] + test: ["CMD", "curl", "-f", "http://localhost:8080/"] diff --git a/samples/golang-s3/app/Dockerfile b/samples/golang-s3/app/Dockerfile index cc460603..c2de6b65 100644 --- a/samples/golang-s3/app/Dockerfile +++ b/samples/golang-s3/app/Dockerfile @@ -17,9 +17,9 @@ COPY . . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . # Start a new stage from scratch -FROM alpine:latest +FROM golang:1.20-slim -RUN apk --no-cache add ca-certificates +RUN apt update && apt install -y curl ca-certificates WORKDIR /root/ diff --git a/samples/golang-s3/compose.yaml b/samples/golang-s3/compose.yaml index dd53a035..ff2af1e5 100644 --- a/samples/golang-s3/compose.yaml +++ b/samples/golang-s3/compose.yaml @@ -15,4 +15,4 @@ services: reservations: memory: 50M healthcheck: - test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/"] + test: ["CMD", "curl", "-f", "http://localhost:8080/"] diff --git a/samples/golang-slackbot/app/Dockerfile b/samples/golang-slackbot/app/Dockerfile index 3c89f62b..9ebf428d 100644 --- a/samples/golang-slackbot/app/Dockerfile +++ b/samples/golang-slackbot/app/Dockerfile @@ -17,9 +17,9 @@ COPY . . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . # Start a new stage from scratch -FROM alpine:latest +FROM golang:1.20-slim -RUN apk --no-cache add ca-certificates +RUN apt update && apt install -y curl ca-certificates WORKDIR /root/ @@ -30,4 +30,4 @@ COPY --from=builder /src/main . EXPOSE 8080 # Run the binary -CMD ["./main"] \ No newline at end of file +CMD ["./main"] diff --git a/samples/golang-slackbot/compose.yaml b/samples/golang-slackbot/compose.yaml index 26446cda..e0cabc6c 100644 --- a/samples/golang-slackbot/compose.yaml +++ b/samples/golang-slackbot/compose.yaml @@ -14,3 +14,5 @@ services: # resources: # reservations: # memory: 256M + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080/"] diff --git a/samples/javalin/app/Dockerfile b/samples/javalin/app/Dockerfile index 7c85615f..841be2b5 100644 --- a/samples/javalin/app/Dockerfile +++ b/samples/javalin/app/Dockerfile @@ -15,6 +15,8 @@ RUN mvn clean package # Stage 2: Create the runtime image FROM openjdk:17-jdk-slim +RUN apt-get update && apt-get install -y curl + # Set the working directory WORKDIR /app @@ -25,4 +27,4 @@ COPY --from=build /app/target/defang-javalin-1.0.0.jar /app/app.jar EXPOSE 7000 # Command to run the Javalin application -CMD ["java", "-jar", "/app/app.jar"] \ No newline at end of file +CMD ["java", "-jar", "/app/app.jar"] diff --git a/samples/javalin/compose.yaml b/samples/javalin/compose.yaml index 2439a47e..f7bc6045 100644 --- a/samples/javalin/compose.yaml +++ b/samples/javalin/compose.yaml @@ -6,3 +6,5 @@ services: - target: 7000 published: 7000 mode: ingress + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:7000/"] diff --git a/samples/langchain/app/Dockerfile b/samples/langchain/app/Dockerfile index 29ff624a..ba95d897 100644 --- a/samples/langchain/app/Dockerfile +++ b/samples/langchain/app/Dockerfile @@ -1,6 +1,8 @@ # Use an official Python runtime as a parent image FROM python:3.11-slim +RUN apt-get update && apt-get install -y curl + # Set the working directory in the container WORKDIR /app diff --git a/samples/langchain/compose.yaml b/samples/langchain/compose.yaml index ac6d2667..66b990e1 100644 --- a/samples/langchain/compose.yaml +++ b/samples/langchain/compose.yaml @@ -10,3 +10,5 @@ services: published: 8080 protocol: tcp mode: ingress + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080/"] diff --git a/samples/nodejs-chatroom/app/Dockerfile b/samples/nodejs-chatroom/app/Dockerfile index d8092b50..07def8a8 100644 --- a/samples/nodejs-chatroom/app/Dockerfile +++ b/samples/nodejs-chatroom/app/Dockerfile @@ -1,6 +1,8 @@ # Use the slim version of Node.js on Debian Bookworm as the base image FROM node:20-bookworm-slim +RUN apt-get update && apt-get install -y curl + # Set the working directory to /app WORKDIR /app diff --git a/samples/nodejs-chatroom/compose.yaml b/samples/nodejs-chatroom/compose.yaml index 6b3e1abd..d9c6cfb1 100644 --- a/samples/nodejs-chatroom/compose.yaml +++ b/samples/nodejs-chatroom/compose.yaml @@ -12,4 +12,4 @@ services: reservations: memory: 256M healthcheck: - test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/"] + test: ["CMD", "curl", "-f", "http://localhost:3000/"] diff --git a/samples/nodejs-express/app/Dockerfile b/samples/nodejs-express/app/Dockerfile index ba70d1ae..d162810e 100644 --- a/samples/nodejs-express/app/Dockerfile +++ b/samples/nodejs-express/app/Dockerfile @@ -1,6 +1,8 @@ # Use the slim version of Node.js on Debian Bookworm as the base image FROM node:20-bookworm-slim +RUN apt-get update && apt-get install -y curl + # Set the working directory to /app WORKDIR /app diff --git a/samples/nodejs-express/compose.yaml b/samples/nodejs-express/compose.yaml index 1de416e9..b06aac1a 100644 --- a/samples/nodejs-express/compose.yaml +++ b/samples/nodejs-express/compose.yaml @@ -11,4 +11,4 @@ services: reservations: memory: 256M healthcheck: - test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/"] + test: ["CMD", "curl", "-f", "http://localhost:3000/"] diff --git a/samples/nodejs-form/app/Dockerfile b/samples/nodejs-form/app/Dockerfile index c25fe297..3fb3b747 100644 --- a/samples/nodejs-form/app/Dockerfile +++ b/samples/nodejs-form/app/Dockerfile @@ -1,6 +1,8 @@ # Use the slim version of Node.js on Debian Bookworm as the base image FROM node:20-bookworm-slim +RUN apt-get update && apt-get install -y curl + # Set the working directory to /app WORKDIR /app diff --git a/samples/nodejs-form/compose.yaml b/samples/nodejs-form/compose.yaml index 599e055f..c98993cb 100644 --- a/samples/nodejs-form/compose.yaml +++ b/samples/nodejs-form/compose.yaml @@ -12,4 +12,4 @@ services: reservations: memory: 256M healthcheck: - test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/"] + test: ["CMD", "curl", "-f", "http://localhost:3000/"] diff --git a/samples/nodejs-http/app/Dockerfile b/samples/nodejs-http/app/Dockerfile index 14ec0dfb..4e592006 100644 --- a/samples/nodejs-http/app/Dockerfile +++ b/samples/nodejs-http/app/Dockerfile @@ -1,6 +1,8 @@ # Use the slim version of Node.js on Debian Bookworm as the base image FROM node:20-bookworm-slim +RUN apt-get update && apt-get install -y curl + # Set the working directory to /app WORKDIR /app diff --git a/samples/nodejs-http/compose.yaml b/samples/nodejs-http/compose.yaml index 599e055f..c98993cb 100644 --- a/samples/nodejs-http/compose.yaml +++ b/samples/nodejs-http/compose.yaml @@ -12,4 +12,4 @@ services: reservations: memory: 256M healthcheck: - test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/"] + test: ["CMD", "curl", "-f", "http://localhost:3000/"] diff --git a/samples/nodejs-openai/app/Dockerfile b/samples/nodejs-openai/app/Dockerfile index c25fe297..3fb3b747 100644 --- a/samples/nodejs-openai/app/Dockerfile +++ b/samples/nodejs-openai/app/Dockerfile @@ -1,6 +1,8 @@ # Use the slim version of Node.js on Debian Bookworm as the base image FROM node:20-bookworm-slim +RUN apt-get update && apt-get install -y curl + # Set the working directory to /app WORKDIR /app diff --git a/samples/nodejs-openai/compose.yaml b/samples/nodejs-openai/compose.yaml index 9d69f3b2..99bc3c83 100644 --- a/samples/nodejs-openai/compose.yaml +++ b/samples/nodejs-openai/compose.yaml @@ -14,4 +14,4 @@ services: reservations: memory: 256M healthcheck: - test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/"] + test: ["CMD", "curl", "-f", "http://localhost:3000/"] diff --git a/samples/nodejs-rest-api/app/Dockerfile b/samples/nodejs-rest-api/app/Dockerfile index c25fe297..3fb3b747 100644 --- a/samples/nodejs-rest-api/app/Dockerfile +++ b/samples/nodejs-rest-api/app/Dockerfile @@ -1,6 +1,8 @@ # Use the slim version of Node.js on Debian Bookworm as the base image FROM node:20-bookworm-slim +RUN apt-get update && apt-get install -y curl + # Set the working directory to /app WORKDIR /app diff --git a/samples/nodejs-rest-api/compose.yaml b/samples/nodejs-rest-api/compose.yaml index 599e055f..c98993cb 100644 --- a/samples/nodejs-rest-api/compose.yaml +++ b/samples/nodejs-rest-api/compose.yaml @@ -12,4 +12,4 @@ services: reservations: memory: 256M healthcheck: - test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/"] + test: ["CMD", "curl", "-f", "http://localhost:3000/"] diff --git a/samples/nodejs-s3/app/Dockerfile b/samples/nodejs-s3/app/Dockerfile index c25fe297..3fb3b747 100644 --- a/samples/nodejs-s3/app/Dockerfile +++ b/samples/nodejs-s3/app/Dockerfile @@ -1,6 +1,8 @@ # Use the slim version of Node.js on Debian Bookworm as the base image FROM node:20-bookworm-slim +RUN apt-get update && apt-get install -y curl + # Set the working directory to /app WORKDIR /app diff --git a/samples/nodejs-s3/compose.yaml b/samples/nodejs-s3/compose.yaml index 65aa3209..54188254 100644 --- a/samples/nodejs-s3/compose.yaml +++ b/samples/nodejs-s3/compose.yaml @@ -15,4 +15,4 @@ services: reservations: memory: 256M healthcheck: - test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/"] + test: ["CMD", "curl", "-f", "http://localhost:3000/"] diff --git a/samples/rails/app/.dockerignore b/samples/rails/app/.dockerignore index 96123753..b09255cd 100644 --- a/samples/rails/app/.dockerignore +++ b/samples/rails/app/.dockerignore @@ -35,3 +35,5 @@ /app/assets/builds/* !/app/assets/builds/.keep /public/assets + +/test diff --git a/samples/sailsjs-postgres/app/Dockerfile b/samples/sailsjs-postgres/app/Dockerfile index 2d674388..cd42ee66 100644 --- a/samples/sailsjs-postgres/app/Dockerfile +++ b/samples/sailsjs-postgres/app/Dockerfile @@ -1,6 +1,8 @@ # Use the slim version of Node.js on Debian Bookworm as the base image FROM node:20-bookworm-slim +RUN apt-get update && apt-get install -y curl + # Create app directory WORKDIR /usr/src/app diff --git a/samples/sailsjs-postgres/compose.yaml b/samples/sailsjs-postgres/compose.yaml index 0669f712..74ae2c9d 100644 --- a/samples/sailsjs-postgres/compose.yaml +++ b/samples/sailsjs-postgres/compose.yaml @@ -16,6 +16,8 @@ services: # resources: # reservations: # memory: 256M + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:1337/"] networks: app-network: diff --git a/samples/svelte-mysql/app/Dockerfile b/samples/svelte-mysql/app/Dockerfile index 2f0657bf..eb6114f7 100644 --- a/samples/svelte-mysql/app/Dockerfile +++ b/samples/svelte-mysql/app/Dockerfile @@ -13,6 +13,8 @@ RUN npm install --legacy-peer-deps && npm run build # Stage 2: Build Node.js backend FROM node:20-bookworm-slim as backend +RUN apt-get update && apt-get install -y curl + WORKDIR /app # Copy backend source code diff --git a/samples/svelte-mysql/compose.yaml b/samples/svelte-mysql/compose.yaml index f34f08c8..b1e55167 100644 --- a/samples/svelte-mysql/compose.yaml +++ b/samples/svelte-mysql/compose.yaml @@ -29,6 +29,8 @@ services: - "3001:3001" depends_on: - db + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:3001/"] #deploy: # resources: # reservations: diff --git a/samples/sveltekit-mongodb/app/Dockerfile b/samples/sveltekit-mongodb/app/Dockerfile index 601e99f5..f20674fa 100644 --- a/samples/sveltekit-mongodb/app/Dockerfile +++ b/samples/sveltekit-mongodb/app/Dockerfile @@ -1,6 +1,8 @@ # Use the slim version of Node.js v20 on Debian Bookworm as the base image FROM node:20-bookworm-slim +RUN apt-get update && apt-get install -y curl + # Set the working directory WORKDIR /app diff --git a/samples/sveltekit-mongodb/compose.yaml b/samples/sveltekit-mongodb/compose.yaml index a1276681..f8165a5d 100644 --- a/samples/sveltekit-mongodb/compose.yaml +++ b/samples/sveltekit-mongodb/compose.yaml @@ -19,6 +19,8 @@ services: # resources: # reservations: # memory: 256M + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:3000/"] mongo: restart: unless-stopped