File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ node_modules
2+ dist
3+ .env
Original file line number Diff line number Diff line change 1+ FROM node:18
2+
3+ WORKDIR /app
4+
5+ COPY package.json yarn.lock ./
6+
7+ RUN yarn install
8+
9+ COPY . .
10+
11+ RUN yarn build
12+
13+ CMD ["yarn" , "start" ]
Original file line number Diff line number Diff line change 1+ version : " 3.8"
2+
3+ services :
4+ backend :
5+ build : .
6+ container_name : database-services-backend
7+ ports :
8+ - " 3000:3000"
9+ volumes :
10+ - .:/app
11+ - /app/node_modules
12+ environment :
13+ - NODE_ENV=development
14+ - PORT=3000
15+ - DB_USERNAME=postgres
16+ - DB_PASSWORD=12345678
17+ - DB_NAME=database_services
18+ - DB_HOST=db
19+ - DB_PORT=5432
20+ - JWT_SECRET=supersecretkey
21+ - JWT_EXPIRES_IN=1h
22+ depends_on :
23+ - db
24+
25+ db :
26+ image : postgres:15
27+ container_name : database-services-db
28+ restart : always
29+ environment :
30+ POSTGRES_USER : postgres
31+ POSTGRES_PASSWORD : 12345678
32+ POSTGRES_DB : database_services
33+ ports :
34+ - " 5432:5432"
35+ volumes :
36+ - pgdata:/var/lib/postgresql/data
37+ healthcheck :
38+ test : ["CMD-SHELL", "pg_isready -U postgres"]
39+ interval : 5s
40+ timeout : 5s
41+ retries : 5
42+
43+ volumes :
44+ pgdata :
You can’t perform that action at this time.
0 commit comments