esoe
6 months ago
7 changed files with 91 additions and 3 deletions
@ -0,0 +1,16 @@ |
|||||||
|
version: "3.7" |
||||||
|
services: |
||||||
|
client-service-teachers: |
||||||
|
build: |
||||||
|
context: ../client-service-teachers |
||||||
|
dockerfile: dockerfile |
||||||
|
image: "client-service-teachers" |
||||||
|
command: ["java","-jar","/app/client-service-teachers-0.1.jar"] |
||||||
|
ports: |
||||||
|
- 80:8181 |
||||||
|
restart: unless-stopped |
||||||
|
networks: |
||||||
|
default: |
||||||
|
external: |
||||||
|
name: tech_network |
||||||
|
driver: bridge |
@ -0,0 +1,5 @@ |
|||||||
|
PG_CONTAINER_NAME='postgres-service' |
||||||
|
POSTGRES_USER='tech-services' |
||||||
|
POSTGRES_PASSWORD='password' |
||||||
|
POSTGRES_DB='tech-services' |
||||||
|
PGDATA='/data/tech-services' |
@ -0,0 +1,34 @@ |
|||||||
|
version: "3.7" |
||||||
|
services: |
||||||
|
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:${PGDATA} |
||||||
|
- predb_tech-services:/var/lib/postgresql/data |
||||||
|
ports: |
||||||
|
- "5432:5432" |
||||||
|
restart: unless-stopped |
||||||
|
volumes: |
||||||
|
db_tech-services: |
||||||
|
external: true |
||||||
|
predb_tech-services: |
||||||
|
external: true |
||||||
|
networks: |
||||||
|
default: |
||||||
|
external: |
||||||
|
name: tech_network |
||||||
|
driver: bridge |
||||||
|
|
||||||
|
# docker volume create db_tech-services |
||||||
|
# docker volume create predb_tech-services |
||||||
|
# docker network create tech_network |
||||||
|
# docker-compose up |
@ -1,7 +1,25 @@ |
|||||||
FROM postgres:latest |
# Postgres-service start |
||||||
|
|
||||||
|
ARG VERSION=latest |
||||||
|
# Образ контейнера |
||||||
|
FROM postgres:${VERSION} |
||||||
|
|
||||||
|
# Сведения о контейнере |
||||||
LABEL author="esoe" |
LABEL author="esoe" |
||||||
LABEL description="postgres image for tech-services" |
LABEL description="postgres image for tech-services" |
||||||
LABEL version="1.0" |
LABEL version="1.0" |
||||||
|
|
||||||
|
# Переменные среды контейнера |
||||||
|
# ENV PG_CONTAINER_NAME='postgres-service' |
||||||
|
# ENV POSTGRES_USER='tech-services' |
||||||
|
# ENV POSTGRES_PASSWORD='password' |
||||||
|
# ENV POSTGRES_DB='tech-services' |
||||||
|
# ENV PGDATA='/data/tech-services' |
||||||
|
|
||||||
# COPY *.sql /docker-entrypoint-initdb.d/ |
# COPY *.sql /docker-entrypoint-initdb.d/ |
||||||
|
|
||||||
|
# Сборка контейнера |
||||||
|
# docker build |
||||||
|
|
||||||
|
# Запуск контейнера |
||||||
|
# docker run |
||||||
|
@ -0,0 +1,16 @@ |
|||||||
|
version: "3.7" |
||||||
|
services: |
||||||
|
resource-service-api: |
||||||
|
build: |
||||||
|
context: ../resource-service-api |
||||||
|
dockerfile: dockerfile |
||||||
|
image: "resource-service-api" |
||||||
|
command: ["java","-jar","/app/resource-service-api-0.1.jar"] |
||||||
|
ports: |
||||||
|
- 81:8181 |
||||||
|
restart: unless-stopped |
||||||
|
networks: |
||||||
|
default: |
||||||
|
external: |
||||||
|
name: tech_network |
||||||
|
driver: bridge |
Loading…
Reference in new issue