Added Docker

This commit is contained in:
2023-12-04 14:47:30 +07:00
parent cd4d75d0c4
commit 135501f4b4
2 changed files with 35 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
FROM node:20-alpine
RUN apk add curl
WORKDIR /app
COPY package.json .
RUN npm install
COPY . .
RUN npm run build
CMD [ "npm", "run", "start" ]
+20
View File
@@ -0,0 +1,20 @@
version: '3.8'
services:
backend:
build:
context: .
dockerfile: ./Dockerfile
environment:
- NEXT_PUBLIC_MEDUSA_BACKEND_URL=http://backend:9000
- NEXT_PUBLIC_BASE_URL=http://localhost:8000
- POSTGRES_URL=postgres://postgres:123456@postgres/medusa-TBcY
restart: always
ports:
- 8000:8000
networks:
- medusa
networks:
medusa:
external: true