-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (38 loc) · 1.06 KB
/
docker-compose.yml
File metadata and controls
40 lines (38 loc) · 1.06 KB
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
version: '3.4'
services:
musicloud-api:
container_name: musicloud-api
build:
dockerfile: Dockerfile
context: .
# Only will build development stage from our dockerfile
target: development
volumes:
- .:/usr/src/app
- ./usr/src/app/node_modules
- ./usr/src/app/tmp
env_file:
- .env
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@musicloud-sql:${POSTGRES_PORT}/${POSTGRES_DB}?schema=public
# Run a command against the development stage of the image
command: npm run start:dev
ports:
- ${PORT}:${PORT}
depends_on:
- musicloud-sql
musicloud-sql:
container_name: musicloud-sql
image: postgres
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- '${POSTGRES_PORT}:${POSTGRES_PORT}'
volumes:
- musicloud-sql-data:/var/lib/postgresql/data
command: postgres -p ${POSTGRES_PORT}
volumes:
musicloud-sql-data: