forked from bernarduswillson/toco-rest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69ad60b
commit 11fc425
Showing
12 changed files
with
4,062 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
# Keep environment variables out of version control | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Use the official Node.js image as the base image | ||
FROM node:latest | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
COPY package*.json ./ | ||
COPY tsconfig.json ./tsconfig.json | ||
COPY ./prisma/schema.prisma ./prisma/ | ||
|
||
RUN npm install | ||
RUN npm uninstall bcrypt | ||
RUN npm install bcrypt@latest --save | ||
RUN npx prisma generate | ||
|
||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
EXPOSE 5000 | ||
|
||
CMD [ "npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
version: '3.3' | ||
services: | ||
postgres: | ||
image: postgres:latest | ||
restart: always | ||
ports: | ||
- 5432:5432 | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: bewe | ||
POSTGRES_DB: tocorest | ||
volumes: | ||
- "./prisma/migrations/db:/docker-entrypoint-initdb.d" | ||
|
||
express: | ||
image: node:latest | ||
build: . | ||
ports: | ||
- 5000:5000 | ||
restart: always | ||
depends_on: | ||
- postgres | ||
environment: | ||
DATABASE_URL: postgresql://postgres:bewe@postgres:5432/tocorest | ||
JWT_SECRET: secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"watch": ["src/"], | ||
"ext": ".ts", | ||
"ignore": ["node_modules"], | ||
"exec": "npm ts-node ./src/index.ts" | ||
} | ||
|
Oops, something went wrong.