forked from ravi2krishna/lms
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
40 lines (38 loc) · 989 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
# Docker compose start container with env variables
services:
local-db:
image: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=itjustworks
- POSTGRES_DB=mydb
ports:
- "5432:5432"
# volumes: # uncomment to persist data using bind mount
# - ./data:/var/lib/postgresql/data
# volumes: # uncomment to persist data using named volume
# - local-db-data:/var/lib/postgresql/data
api-server:
image: lms-public-api
build: api/
environment:
- MODE=local
- PORT=8080
- DATABASE_URL=postgresql://postgres:itjustworks@local-db:5432/mydb
ports:
- "8080:8080"
restart: on-failure
depends_on:
- local-db
web-server:
image: lms-web
build: webapp/
environment:
- MODE=local
- API_URL=http://api-server:8080
ports:
- "3000:80"
depends_on:
- api-server
# volumes:
# local-db-data: # uncomment to persist data using named volume