-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
63 lines (58 loc) · 1.37 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: '3.9'
volumes:
postgres: {}
services:
database:
container_name: feed-me-baby-postgres
image: postgres:14-alpine
restart: always
environment:
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASS}
networks:
- mynetwork
ports:
- '5432:5432'
volumes:
- './postgres:/var/lib/postgresql/data'
pgadmin:
container_name: feed-me-baby-pgadmin
image: dpage/pgadmin4
restart: always
networks:
- mynetwork
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: ${DATABASE_PASS}
ports:
- '5050:80'
nest-app:
container_name: feed-me-baby-NestJS
build:
context: .
dockerfile: docker/local.Dockerfile
ports:
# app port
- '3000:3000'
# debugging port
- '9229:9229'
volumes:
- .:/usr/src/app
# npm run start
# npm run start:debug -> this is debugging mode
command: npm run start
depends_on:
- database
networks:
- mynetwork
environment:
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_USER: ${DATABASE_USER}
DATABASE_PASS: ${DATABASE_PASS}
DATABASE_HOST: ${DATABASE_HOST}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS}
JWT_SECRET: ${JWT_SECRET}
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN}
networks:
mynetwork: