File tree Expand file tree Collapse file tree 3 files changed +18
-12
lines changed Expand file tree Collapse file tree 3 files changed +18
-12
lines changed Original file line number Diff line number Diff line change 1
- FROM node:18.18 as node
1
+ FROM node:18.18-alpine as node
2
2
3
3
WORKDIR /usr/app
4
4
5
5
COPY package.json package-lock.json ./
6
6
7
7
RUN npm install
8
- COPY . .
8
+ COPY . .
Original file line number Diff line number Diff line change @@ -3,31 +3,34 @@ version: '3.8'
3
3
services :
4
4
api :
5
5
container_name : sos-rs-api
6
- image : node:18.18
6
+ image : node:18.18-alpine
7
7
restart : always
8
8
tty : true
9
9
depends_on :
10
10
- db
11
11
ports :
12
- - ' 4000:4000 '
12
+ - " ${PORT}:${PORT} "
13
13
volumes :
14
14
- .:/usr/app
15
15
- /usr/app/node_modules
16
16
working_dir : ' /usr/app'
17
17
environment :
18
- - DB_HOST=sos-rs-db
19
- - DB_PORT=5432
20
- - DB_DATABASE_NAME=sos_rs
21
- - DB_USER=root
22
- - DB_PASSWORD=root
18
+ - DB_HOST=${DB_HOST}
19
+ - DB_PORT=${DB_PORT}
20
+ - DB_DATABASE_NAME=${DB_DATABASE_NAME}
21
+ - DB_USER=${DB_USER}
22
+ - DB_PASSWORD=${DB_PASSWORD}
23
+ - PORT=${PORT}
23
24
command : >
24
25
sh -c "npm install &&
25
26
npx prisma generate &&
26
27
npx prisma migrate dev &&
27
- npm run start:dev"
28
+ npm run start:dev -- --preserveWatchOutput "
28
29
db :
29
30
container_name : sos-rs-db
30
31
image : postgres
32
+ ports :
33
+ - " ${DB_PORT}:${DB_PORT}"
31
34
environment :
32
- - POSTGRES_PASSWORD=root
33
- - POSTGRES_USER=root
35
+ - POSTGRES_PASSWORD=${DB_PASSWORD}
36
+ - POSTGRES_USER=${DB_USER}
Original file line number Diff line number Diff line change 30
30
"@/guards/*" : [" ./src/guards/*" ],
31
31
"@/guards" : [" ./src/guards" ]
32
32
}
33
+ },
34
+ "watchOptions" : {
35
+ "watchFile" : " fixedPollingInterval"
33
36
}
34
37
}
You can’t perform that action at this time.
0 commit comments