forked from SOS-RS/backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
36 lines (35 loc) · 824 Bytes
/
docker-compose.dev.yml
File metadata and controls
36 lines (35 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
version: '3.8'
services:
api:
container_name: sos-rs-api
image: node:18.18-alpine
restart: always
tty: true
depends_on:
- db
ports:
- '${PORT}:${PORT}'
volumes:
- .:/usr/app
- /usr/app/node_modules
working_dir: '/usr/app'
environment:
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_DATABASE_NAME=${DB_DATABASE_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- PORT=${PORT}
command: >
sh -c "npm install &&
npx prisma generate &&
npx prisma migrate dev &&
npm run start:dev -- --preserveWatchOutput"
db:
container_name: sos-rs-db
image: postgres
ports:
- '${DB_PORT}:${DB_PORT}'
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_USER=${DB_USER}