Skip to content

Commit

Permalink
feat: add Docker configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
TechQuery committed Oct 5, 2023
1 parent d002cd0 commit d65d866
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 6 deletions.
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:18-slim

USER root

RUN npm rm yarn -g

RUN mkdir /home/node/app
WORKDIR /home/node/app

COPY package.json package-lock.json file-content-injector.js /home/node/app/
RUN npm i

COPY . /home/node/app

RUN npm prune --production || true \
npm cache clean -f

EXPOSE 3000
CMD ["npm", "start"]
26 changes: 26 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: '3'

networks:
polyfiller:

services:
api-service:
image: polyfiller/api-service
environment:
- NODE_ENV=production
ports:
- 3000:3000
networks:
- polyfiller
restart: always
caddy:
depends_on:
- api-service
image: caddy
ports:
- 80:80
- 443:443
networks:
- polyfiller
restart: always
command: caddy reverse-proxy --from polyfiller.app --to api-service:3000
8 changes: 3 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"@typescript-eslint/parser": "5.48.2",
"@wessberg/di-compiler": "3.2.0",
"@rollup/plugin-json": "6.0.0",
"@wessberg/ts-config": "3.1.0",
"@wessberg/prettier-config": "1.0.0",
"ava": "5.1.1",
"eslint": "8.32.0",
Expand Down Expand Up @@ -93,6 +92,7 @@
"@wessberg/di": "2.1.0",
"@wessberg/pointer-events": "1.0.9",
"@wessberg/stringutil": "1.0.19",
"@wessberg/ts-config": "3.1.0",
"lit": "2.6.1",
"blob-polyfill": "5.0.20210201",
"browserslist": "4.21.5",
Expand Down

0 comments on commit d65d866

Please sign in to comment.