File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed 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}
You can’t perform that action at this time.
0 commit comments