diff --git a/backend.Dockerfile b/backend.Dockerfile index f2967423..88be591d 100644 --- a/backend.Dockerfile +++ b/backend.Dockerfile @@ -7,9 +7,12 @@ COPY ./backend/package*.json ./ RUN npm install COPY ./backend ./backend +COPY ./tsconfig.json /app WORKDIR /app/backend +RUN npm run build + EXPOSE 2002 -CMD ["npm", "start"] \ No newline at end of file +CMD ["npm", "run", "start"] \ No newline at end of file diff --git a/backend/.env.production b/backend/.env.production new file mode 100644 index 00000000..58694df4 --- /dev/null +++ b/backend/.env.production @@ -0,0 +1,6 @@ +DWENGO_PORT=3000 +DWENGO_DB_HOST=localhost +DWENGO_DB_PORT=5431 +DWENGO_DB_USERNAME=postgres +DWENGO_DB_PASSWORD=postgres +DWENGO_DB_UPDATE=true diff --git a/backend/package.json b/backend/package.json index 478b26e6..3267d28f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -7,7 +7,7 @@ "scripts": { "build": "NODE_ENV=production tsc --project tsconfig.json", "dev": "NODE_ENV=development tsx watch --env-file=.env.development.local src/app.ts", - "start": "NODE_ENV=production node --env-file=.env dist/app.js", + "start": "NODE_ENV=production node --env-file=.env.production dist/app.js", "format": "prettier --write src/", "format-check": "prettier --check src/", "lint": "eslint . --fix",