Skip to content

Commit 8f757c0

Browse files
committed
chore: update node vesion in docker to 16
1 parent 3ef5c87 commit 8f757c0

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,5 @@ dist
103103
# TernJS port file
104104
.tern-port
105105

106-
build
106+
build
107+
pgdata

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM node:12-alpine AS builder
1+
FROM node:16-alpine AS builder
22
WORKDIR /app
33
COPY package*.json ./
44
RUN npm install
55
COPY . .
66
RUN npm run build
77

8-
FROM node:12-alpine AS server
8+
FROM node:16-alpine AS server
99
WORKDIR /app
1010
COPY package* ./
1111
RUN npm install --production

Dockerfile.dev

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:12
1+
FROM node:16
22

33
WORKDIR /app
44

docker-compose.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ services:
99
- POSTGRES_PASSWORD=postgres
1010
volumes:
1111
- ./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
1219
app:
1320
build:
1421
context: .
@@ -17,8 +24,9 @@ services:
1724
- ./src:/app/src
1825
ports:
1926
- "8000:8000"
20-
depends_on:
21-
- db
27+
depends_on:
28+
db:
29+
condition: service_healthy
2230
environment:
2331
- POSTGRES_DB=express-ts
2432
- POSTGRES_USER=postgres

0 commit comments

Comments
 (0)