diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..77881d0 --- /dev/null +++ b/Dockerfile @@ -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" ] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3273735 --- /dev/null +++ b/docker-compose.yml @@ -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