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.
|
|
|
version: "3"
|
|
|
|
services:
|
|
|
|
resource-service-api:
|
|
|
|
build: resource-service-api/
|
|
|
|
command: ["java","-jar","/app/resource-service-api-0.1.jar"]
|
|
|
|
ports:
|
|
|
|
- 80:8181
|
|
|
|
|
|
|
|
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
|