generated from SamuelB7/nestjs-prisma-jwt-api-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
44 lines (39 loc) · 909 Bytes
/
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
38
39
40
41
42
43
44
version: '3'
services:
ecommerce-rest-db:
container_name: ecommerce-rest-db
image: postgres:15
restart: always
ports:
- 5432:5432
networks:
- base_network
volumes:
- ./data/pg:/data/postgres
env_file:
- .env
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
PGDATA: /data/postgres
ecommerce-rest-api:
container_name: ecommerce-rest-api
image: node:lts
networks:
- base_network
ports:
- 3333:3333
command: sh -c "yarn start:dev"
depends_on:
- ecommerce-rest-db
working_dir: /app
volumes:
- .:/app
env_file: .env
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@ecommerce-rest-db:5432/${POSTGRES_DB}?schema=public
networks:
base_network:
volumes:
db-data: