-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
44 lines (44 loc) · 1.03 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
version: "3.7"
services:
srv:
build: ./srv
expose:
- ${APP_SERVER_PORT}
environment:
API_HOST: ${API_HOST}
APP_SERVER_PORT: ${APP_SERVER_PORT}
DB_URL: postgres://user:password@db:5432/app
depends_on:
- db
ports:
- ${APP_SERVER_PORT}:${APP_SERVER_PORT}
volumes:
- ./srv:/usr/src/srv/
command: "npm run watch"
web:
build:
context: ./web
target: "develop-stage"
environment:
- HOST=0.0.0.0
- PORT=${VUE_APP_PORT}
- CHOKIDAR_USEPOLLING=true
expose:
- ${VUE_APP_PORT}
ports:
- ${HOST_APP_PORT}:${VUE_APP_PORT}
volumes:
- ./web:/usr/src/web:cached
command: "npm run serve"
db:
image: "postgres"
container_name: "app_db"
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_DATABASE}
ports:
- "5432:5432"
volumes:
- ./postgres-data:/var/lib/postgresql
- ./postgres-init/init.sql:/docker-entrypoint-initdb.d/init.sql