-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
37 lines (37 loc) · 1.02 KB
/
docker-compose.yml
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
37
version: "3.8"
services:
api:
build:
dockerfile: Dockerfile
context: ./docker-test
target: ${NODE_ENV}
volumes:
- ./docker-test:/usr/src/app
- ./usr/src/app/node_modules
command: npm run start:dev
depends_on:
- postgres
environment:
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
NODE_ENV: ${NODE_ENV}
JWT_SECRET: ${JWT_SECRET}
PORT: 3000
ports:
- "${API_PORT}:3000"
postgres:
image: postgres:13
ports:
- "${POSTGRES_PORT}:5432"
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
postgres_admin:
image: dpage/pgadmin4:4.28
depends_on:
- postgres
environment:
PGADMIN_DEFAULT_EMAIL: ${PG_ADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PG_ADMIN_PASSWORD}
ports:
- "${POSTGRES_ADMIN_PORT}:80"