prepare for docker env

This commit is contained in:
Shihaam Abdul Rahman 2024-12-09 01:57:18 +05:00
parent f9cac92858
commit fd4e147683
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636
4 changed files with 34 additions and 0 deletions

7
.build/dev/compose.yml Normal file
View File

@ -0,0 +1,7 @@
services:
node:
build:
context: ../../
dockerfile: .build/dev/node.Dockerfile
hostname: sarlink-portal
image: git.shihaam.dev/sarlink/sarlink-portal

View File

@ -0,0 +1,7 @@
FROM node:18
SHELL ["/bin/bash", "-c"]
WORKDIR /var/www/html
CMD npm run dev

13
.build/prod/Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:18
# Use bash as the default shell
SHELL ["/bin/bash", "-c"]
ENV NODE_ENV=production
WORKDIR /var/www/html
COPY .. /var/www/html
RUN yarn install && yarn build
CMD yarn start

7
.build/prod/compose.yml Normal file
View File

@ -0,0 +1,7 @@
services:
node:
build:
context: ../../
dockerfile: .build/prod/Dockerfile
hostname: sarlink-portal
image: git.shihaam.dev/sarlink/sarlink-portal