-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
59 lines (57 loc) · 1.47 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
version: '3.4'
services:
nexus:
image: sonatype/nexus3
ports:
- "8081:8081"
container_name: nexus
user: "200:200" # Specify the user and group IDs for the Nexus process
volumes:
- ./nexus-data:/nexus-data
command: ["sh", "-c", "chown -R 200:200 /nexus-data && exec /opt/sonatype/nexus/bin/nexus run"]
api-gateway:
build:
context: ./backend/api-gateway
ports:
- "8080:8080"
restart: on-failure
environment:
eureka.client.serviceUrl.defaultZone: http://eureka-server:9091/eureka/
depends_on:
- eureka-server
- nexus
eureka-server:
build:
context: ./backend/eureka-server
ports:
- "9091:9091"
restart: on-failure
postgres:
image: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: tasks
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pospos
ports:
- "5432:5432"
microservice-main:
build:
context: ./backend/main
container_name: microservice-main
ports:
- "9082:9082"
restart: on-failure
environment:
eureka.client.serviceUrl.defaultZone: http://eureka-server:9091/eureka/
spring.datasource.url: jdbc:postgresql://postgres:5432/tasks
spring.datasource.username: postgres
spring.datasource.password: pospos
depends_on:
- eureka-server
- nexus
volumes:
postgres_data:
name: postgres_data
driver: local