-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
40 lines (38 loc) · 1.07 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
version: '3.8'
services:
database:
container_name: petflix-database
image: postgres
volumes:
- ./data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- 5432:5432
restart: always
networks:
- net
server:
container_name: petflix-server
build: .
image: petflix-server
restart: always
command: npm run start:prod
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@petflix-database:5432/petflix
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ADMIN_EMAIL: ${ADMIN_EMAIL}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
RAPID_API_KEY: ${RAPID_API_KEY}
JWT_PASS: ${JWT_PASS}
ports:
- 3232:3000
networks:
- net
depends_on:
- database
networks:
net:
driver: bridge