diff --git a/Dockerfile b/Dockerfile index fef086f72d..6b13a712b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,12 @@ FROM node:20.10.0 AS build WORKDIR /usr/src/app -COPY . . - -RUN npm install -g typescript +COPY package*.json ./ RUN npm install +COPY . . + RUN npm run build EXPOSE 4321 diff --git a/docker-compose.yaml b/docker-compose.yaml index 5936109b22..069c63bb01 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,7 +5,17 @@ services: dockerfile: Dockerfile environment: - REACT_APP_TALAWA_URL=${REACT_APP_TALAWA_URL} - # volumes: - # - .:/usr/src/app ports: - 4321:4321 + user: node + healthcheck: + test: ['CMD', 'curl', '-f', 'http://localhost:4321'] + interval: 30s + timeout: 10s + retries: 3 + restart: unless-stopped + deploy: + resources: + limits: + cpus: '1' + memory: 1G