-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
33 lines (33 loc) · 1.03 KB
/
docker-compose.yaml
File metadata and controls
33 lines (33 loc) · 1.03 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
version: '3.4'
x-var:
- &DATABASE_USERNAME testuser
- &DATABASE_PASSWORD testuser
volumes:
basicOntimize-db-vol:
services:
database:
extends:
file: docker-compose-services.yaml
service: database
app:
image: maven:3-jdk-11
environment:
DATABASE_SERVICE: db.basicOntimize:5432
DATABASE_USER: *DATABASE_USERNAME
DATABASE_PASSWORD: *DATABASE_PASSWORD
hostname: basicOntimize
container_name: basicOntimize
working_dir: /app
command: >
sh -c "echo 'Building the application...'
&& mvn -U clean install -P compose
&& echo 'Restoring the files and folders ownership...'
&& find \\( -name 'target' -o -name 'dist' -o -name 'node' -o -name 'node_modules' -o -name 'package-lock.json' \\) -exec chown -R \$( stat . -c %u:%g ) {} +
&& echo 'Launching the application...'
&& java -jar basicOntimize-boot/target/basicOntimize-boot.jar --spring.profiles.active=compose"
volumes:
- ./:/app/
depends_on:
- database
ports:
- "8080:8080"