-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
45 lines (41 loc) · 916 Bytes
/
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
version: '3.7'
volumes:
images:
services:
frontend:
build: frontend/docker
environment:
API_URL: /entries
ports:
- "80:80"
volumes:
- images:/usr/share/nginx/html/images
- ./conf:/etc/nginx/conf.d
links:
- backend
backend:
build:
context: backend
dockerfile: Dockerfile
args:
JAR_FILE: build/libs/guestbook-0.1.0.jar
command: "java -jar /app/app.jar"
ports:
- "8080:8080"
environment:
SPRING_PROFILES_ACTIVE: postgres
GUESTBOOK_IMAGES_LOCAL_URLPREFIX: /images
GUESTBOOK_IMAGES_LOCAL_FILEPATH: /images/
DATABASE_URL: jdbc:postgresql://db:5432/postgres
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: hunter2
volumes:
- images:/images
links:
- db
db:
build: database
ports:
- "5632:5432"
environment:
POSTGRES_PASSWORD: hunter2