diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 894239ee..00000000 --- a/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM node:alpine -WORKDIR /app - -# COPY the package.json file, update any deps and install them -COPY package.json . -RUN npm install - -# copy the whole source folder(the dir is relative to the Dockerfile -COPY . . -CMD [ "npm", "run", "start" ] - -FROM nginx -EXPOSE 80 -COPY --from=builder /app/public /usr/share/nginx/html \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index d3da952b..ec384a13 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,18 +1,23 @@ services: pola_web-init: - image: node:20.10.0-stretch + image: node:20-bookworm-slim working_dir: /app volumes: - .:/app - command: npm install + command: npm install --legacy-peer-deps pola_web: - image: node:20.10.0-stretch + image: node:20-bookworm-slim working_dir: /app volumes: - .:/app command: npm run develop -- -H=0.0.0.0 ports: - 8000:8000 + expose: + - 8000 + environment: + - CONTENTFUL_SPACE_ID=${CONTENTFUL_SPACE_ID:-} + - CONTENTFUL_ACCESS_TOKEN=${CONTENTFUL_ACCESS_TOKEN:-} depends_on: pola_web-init: condition: service_completed_successfully