-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (37 loc) · 868 Bytes
/
docker-compose.yml
File metadata and controls
40 lines (37 loc) · 868 Bytes
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
# make sure .env file exists!
version: '3.8'
networks:
backend:
name: "tv-backend"
external: false
metrics:
name: "tv-metrics"
external: true
services:
app:
container_name: teamview-app
build: .
command: bash -c "npx knex migrate:latest --env production; npm run start"
networks:
- backend
depends_on: [db]
ports: # HOST:INTERNAL
- "3002:$APP_PORT"
links: [db]
restart: unless-stopped
volumes:
- ./logs/app:/app/logs
db:
container_name: teamview-db
image: postgres:latest
environment:
POSTGRES_DB: $POSTGRES_DB
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
networks:
- backend
ports: # HOST:INTERNAL
- "5432:$POSTGRES_PORT"
restart: unless-stopped
volumes:
- .docker/postgres:/var/lib/postgresql/data