split docker-compose.yml to extract database services
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
services:
|
||||||
|
couchdb:
|
||||||
|
image: couchdb
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- COUCHDB_USER=admin
|
||||||
|
- COUCHDB_PASSWORD=admin
|
||||||
|
ports:
|
||||||
|
- 5984:5984
|
||||||
|
networks:
|
||||||
|
- database
|
||||||
|
- frontend
|
||||||
|
volumes:
|
||||||
|
- couchdb-data:/opt/couchdb/data
|
||||||
|
secrets:
|
||||||
|
- couchdb-password
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
couchdb-data:
|
||||||
|
secrets:
|
||||||
|
couchdb-password:
|
||||||
|
file: couchdb-password.txt
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB=kontor
|
||||||
|
- POSTGRES_USER=kontor
|
||||||
|
#- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
|
||||||
|
- POSTGRES_PASSWORD=kontor
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U kontor"]
|
||||||
|
interval: 1s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 10
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
networks:
|
||||||
|
- database
|
||||||
|
volumes:
|
||||||
|
- postgres-data:/var/lib/postgresql/data:rw
|
||||||
|
secrets:
|
||||||
|
- db-password
|
||||||
|
adminer:
|
||||||
|
image: adminer
|
||||||
|
ports:
|
||||||
|
- 8090:8080
|
||||||
|
networks:
|
||||||
|
- database
|
||||||
|
- frontend
|
||||||
|
volumes:
|
||||||
|
postgres-data:
|
||||||
|
secrets:
|
||||||
|
db-password:
|
||||||
|
file: db-password.txt
|
||||||
+35
-50
@@ -1,48 +1,7 @@
|
|||||||
|
include:
|
||||||
|
- ./compose-postgres.yaml
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
|
||||||
image: postgres
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
- POSTGRES_DB=kontor
|
|
||||||
- POSTGRES_USER=kontor
|
|
||||||
#- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
|
|
||||||
- POSTGRES_PASSWORD=kontor
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "pg_isready -U kontor"]
|
|
||||||
interval: 1s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 10
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
networks:
|
|
||||||
- database
|
|
||||||
volumes:
|
|
||||||
- postgres-data:/var/lib/postgresql/data:rw
|
|
||||||
secrets:
|
|
||||||
- db-password
|
|
||||||
adminer:
|
|
||||||
image: adminer
|
|
||||||
ports:
|
|
||||||
- 8090:8080
|
|
||||||
networks:
|
|
||||||
- database
|
|
||||||
- frontend
|
|
||||||
couchdb:
|
|
||||||
image: couchdb
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
- COUCHDB_USER=admin
|
|
||||||
- COUCHDB_PASSWORD=admin
|
|
||||||
ports:
|
|
||||||
- 5984:5984
|
|
||||||
networks:
|
|
||||||
- database
|
|
||||||
- frontend
|
|
||||||
volumes:
|
|
||||||
- couchdb-data:/opt/couchdb/data
|
|
||||||
secrets:
|
|
||||||
- couchdb-password
|
|
||||||
activemq:
|
activemq:
|
||||||
image: apache/activemq-artemis:latest-alpine
|
image: apache/activemq-artemis:latest-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -56,6 +15,11 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- activemq-data:/var/lib/artemis-instance
|
- activemq-data:/var/lib/artemis-instance
|
||||||
kontor:
|
kontor:
|
||||||
|
build:
|
||||||
|
context: ./kontor-spring
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
tags:
|
||||||
|
- kontor:0.2.0-SNAPSHOT
|
||||||
image: kontor:0.2.0-SNAPSHOT
|
image: kontor:0.2.0-SNAPSHOT
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
@@ -70,6 +34,11 @@ services:
|
|||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
kontor-api:
|
kontor-api:
|
||||||
|
build:
|
||||||
|
context: ./kontor-api
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
tags:
|
||||||
|
- kontor-api:0.2.0-SNAPSHOT
|
||||||
image: kontor-api:0.2.0-SNAPSHOT
|
image: kontor-api:0.2.0-SNAPSHOT
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
@@ -84,6 +53,11 @@ services:
|
|||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
kontor-angular:
|
kontor-angular:
|
||||||
|
build:
|
||||||
|
context: ./kontor-angular
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
tags:
|
||||||
|
- kontor-angular:0.2.0-SNAPSHOT
|
||||||
image: kontor-angular:0.2.0-SNAPSHOT
|
image: kontor-angular:0.2.0-SNAPSHOT
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
@@ -95,19 +69,30 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
kontor-vue:
|
||||||
|
build:
|
||||||
|
context: ./kontor-vue
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
tags:
|
||||||
|
- kontor-vue:0.2.0-SNAPSHOT
|
||||||
|
image: kontor-vue:0.2.0-SNAPSHOT
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- database
|
||||||
|
- integration
|
||||||
|
- frontend
|
||||||
|
ports:
|
||||||
|
- 8300:80
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
database:
|
database:
|
||||||
integration:
|
integration:
|
||||||
name: integration
|
name: integration
|
||||||
frontend:
|
frontend:
|
||||||
volumes:
|
volumes:
|
||||||
postgres-data:
|
|
||||||
couchdb-data:
|
|
||||||
activemq-data:
|
activemq-data:
|
||||||
images-data:
|
images-data:
|
||||||
secrets:
|
|
||||||
db-password:
|
|
||||||
file: db-password.txt
|
|
||||||
couchdb-password:
|
|
||||||
file: couchdb-password.txt
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user