You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.5 KiB
54 lines
1.5 KiB
version: "3" |
|
services: |
|
client-service-teachers: |
|
build: client-service-teachers/ |
|
command: ["java","-jar","/app/client-service-teachers-0.1.jar"] |
|
ports: |
|
- 80:8181 |
|
depends_on: |
|
- resource-service-api |
|
|
|
resource-service-api: |
|
build: resource-service-api/ |
|
command: ["java","-jar","/app/resource-service-api-0.1.jar"] |
|
ports: |
|
- 81:8181 |
|
depends_on: |
|
- postgres-service |
|
|
|
postgres-service: |
|
build: |
|
context: postgres-service/ |
|
# dockerfile: dockerfile |
|
image: "postgres-service" |
|
container_name: ${PG_CONTAINER_NAME} |
|
environment: |
|
POSTGRES_DB: ${POSTGRES_DB} |
|
POSTGRES_USER: ${POSTGRES_USER} |
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} |
|
PGDATA: ${PGDATA} |
|
volumes: |
|
- db_tech-services:/data/postgres-tech-services |
|
ports: |
|
- "5432:5432" |
|
restart: unless-stopped |
|
|
|
volumes: |
|
db_tech-services: |
|
external: true |
|
|
|
# Создание тома для базы данных |
|
# docker volume create db_tech-services |
|
|
|
# перед сборкой контенера необходимо пересобрать каждый сервис, |
|
# выполнить в соответствующем каталоге для каждого java-сервиса |
|
# mvn clean package |
|
|
|
# Сборка образа: |
|
# docker-compose build |
|
|
|
# Запуск контейнеров платформы: |
|
# docker-compose up -d |
|
|
|
# Остановка всех контейнеров платформы: |
|
# docker-compose down |