File tree 4 files changed +15
-6
lines changed
4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 103
103
# TernJS port file
104
104
.tern-port
105
105
106
- build
106
+ build
107
+ pgdata
Original file line number Diff line number Diff line change 1
- FROM node:12 -alpine AS builder
1
+ FROM node:16 -alpine AS builder
2
2
WORKDIR /app
3
3
COPY package*.json ./
4
4
RUN npm install
5
5
COPY . .
6
6
RUN npm run build
7
7
8
- FROM node:12 -alpine AS server
8
+ FROM node:16 -alpine AS server
9
9
WORKDIR /app
10
10
COPY package* ./
11
11
RUN npm install --production
Original file line number Diff line number Diff line change 1
- FROM node:12
1
+ FROM node:16
2
2
3
3
WORKDIR /app
4
4
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ services:
9
9
- POSTGRES_PASSWORD=postgres
10
10
volumes :
11
11
- ./pgdata:/var/lib/postgresql/data
12
+ ports :
13
+ - 5432:5432
14
+ healthcheck :
15
+ test : ["CMD-SHELL", "pg_isready -U postgres"]
16
+ interval : 30s
17
+ timeout : 30s
18
+ retries : 3
12
19
app :
13
20
build :
14
21
context : .
@@ -17,8 +24,9 @@ services:
17
24
- ./src:/app/src
18
25
ports :
19
26
- " 8000:8000"
20
- depends_on :
21
- - db
27
+ depends_on :
28
+ db :
29
+ condition : service_healthy
22
30
environment :
23
31
- POSTGRES_DB=express-ts
24
32
- POSTGRES_USER=postgres
You can’t perform that action at this time.
0 commit comments