diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index ddd9233..0000000 --- a/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM node:12-alpine - -# Create app directory -WORKDIR /usr/src/app - -# Copy packages to the docker image -COPY package*.json ./ - -# Installing dependencies -RUN npm install - -# Copy the rest of the content -COPY . ./ - -# Opening port 3000 -EXPOSE 3000:3000 - -# Live reload -VOLUME [ "./:/src/app", "/app/node_modules", "/app/.next" ] \ No newline at end of file diff --git a/Dockerfile.production b/Dockerfile.production index 1b2c988..5450607 100644 --- a/Dockerfile.production +++ b/Dockerfile.production @@ -1,3 +1,6 @@ +# Dockerfile used to create the production image +# Environment variables are set inside the Kubernetes cofiguration files + FROM node:12-alpine # Create app directory diff --git a/api/Dockerfile b/api/Dockerfile index 7123c09..ce09761 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,3 +1,6 @@ +# Dockerfile used in the main docker compose to create the image of the API +# Environment variables and start commands are handled inside the docker compose + FROM strapi/base # Create app directory diff --git a/api/Dockerfile.production b/api/Dockerfile.production index 0779742..8fcb7d4 100644 --- a/api/Dockerfile.production +++ b/api/Dockerfile.production @@ -1,3 +1,6 @@ +# Dockerfile used to create the production image +# Environment variables are set inside the Kubernetes cofiguration files + FROM strapi/base # Create app directory @@ -19,6 +22,7 @@ ENV DATABASE_PORT=5432 ENV DATABASE_NAME=strapi ENV DATABASE_USERNAME= ENV DATABASE_PASSWORD= +ENV PRODUCTION_URL= ENV ADMIN_JWT_SECRET= RUN npm run build diff --git a/docker-compose.yml b/docker-compose.yml index 3adde60..3bcb2f2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,5 @@ +# Docker compose files used for dev environments + version: "3.8" services: