generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 51
/
docker-compose.yml
45 lines (42 loc) · 950 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
45
version: "3.2"
services:
api:
image: jred/fola
build:
context: .
dockerfile: Dockerfile-jared
environment:
NODE_ENV: local
DATABASE_URL: postgres://fola:pgpass@db:5432/food
POSTGRES_USERNAME: fola
POSTGRES_PASSWORD: pgpass
POSTGRES_DATABASE: food
POSTGRES_HOST: db
POSTGRES_PORT: 5432
WAIT_FOR: db:5432
links:
- db
depends_on:
- db
networks:
- backend
ports:
- "5001:5001"
volumes:
- ./:/fola
- /fola/node_modules
command: npx nodemon -w /fola/server.js -w /fola/app -w /fola/middleware -L server.js
db:
image: postgres:11
restart: always
ports:
# exposed on localhost 5433
- "5433:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pgpass
POSTGRES_DB: food
networks:
- backend
networks:
backend: