-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
57 lines (56 loc) · 1.42 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
version: '3'
services:
postgres-database:
container_name: postgres-database
restart: always
image: postgres:alpine
ports:
- 5432:5432
volumes:
- $HOME/docker/volumes/postgres:/var/lib/postgresql/data
- ./postgres-seed:/docker-entrypoint-initdb.d #run these scripts on first container creation
environment:
- POSTGRES_PASSWORD=docker
express-api:
image: express-api:latest
build:
context: ./express-api
container_name: express-api
restart: always
ports:
- "3000:3000"
links:
- postgres-database:db
depends_on:
- postgres-database
environment:
- DB_HOST=db
- DB_PASSWORD=docker
- DB_USER=postgres
- DB_NAME=postgres
pgweb:
container_name: pgweb # optional
restart: always # optional
image: sosedoff/pgweb
ports:
- "8081:8081"
links:
- postgres-database:db # my database container is called postgres, not db
environment:
- DATABASE_URL=postgres://postgres:docker@db:5432/postgres?sslmode=disable
depends_on:
- postgres-database # my database container is called postgres, not db
vue-client:
container_name: vue-client
restart: always
image: vue-client:latest
build:
context: ./vue-client
ports:
- 8080:80
links:
- express-api:backend
environment:
- API_HOST=backend
depends_on:
- express-api