diff --git a/api/.dockerignore b/api/.dockerignore new file mode 100644 index 0000000..0979a6c --- /dev/null +++ b/api/.dockerignore @@ -0,0 +1 @@ +**/node_modules/** diff --git a/api/Dockerfile b/api/Dockerfile new file mode 100644 index 0000000..b5a4b73 --- /dev/null +++ b/api/Dockerfile @@ -0,0 +1,17 @@ +FROM node:20-alpine + +WORKDIR /app + +COPY ./package*.json ./ + +RUN npm ci + +COPY . ./ + +EXPOSE 5172 +EXPOSE 5170 + +ARG ENVIRONMENT +ENV ENVIRONMENT ${ENVIRONMENT} + +CMD npm run ${ENVIRONMENT} diff --git a/api/docker-compose.yaml b/api/docker-compose.yaml new file mode 100644 index 0000000..347119c --- /dev/null +++ b/api/docker-compose.yaml @@ -0,0 +1,14 @@ +services: + shiftsync-web: + image: 'docker.io/john4064/shiftsync:prod_api' + environment: + - 'TESTVAR=${COOLIFY_VAR}' + volumes: + - /home/jparkhurst/shiftsync:/shiftsync + ports: + - "5172:5172" + healthcheck: + test: ["CMD", "wget", "-qO-", "http://localhost:5172"] + interval: 10s + timeout: 5s + retries: 5 \ No newline at end of file