-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
45 lines (41 loc) · 996 Bytes
/
docker-compose.dev.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
version: "3.8"
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
ports:
- "3000:3000"
environment:
- BACKEND_URL=http://backend:8080
volumes:
- ./frontend:/app
- /app/node_modules
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
ports:
- "8080:8080"
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/mydatabase
- SPRING_DATASOURCE_USERNAME=myuser
- SPRING_DATASOURCE_PASSWORD=mypassword
- SPRING_PROFILES_ACTIVE=dev
volumes:
- ./backend:/workspace/app
- ~/.gradle:/home/gradle/.gradle # This is to cache Gradle dependencies
depends_on:
- postgres
postgres:
image: postgres:latest
ports:
- "5432:5432"
environment:
POSTGRES_DB: mydatabase
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata: