From 7e1823dca68e282995a11147589f5f3fbf86eec3 Mon Sep 17 00:00:00 2001 From: perl Date: Thu, 3 Oct 2024 23:44:15 +0300 Subject: [PATCH] add some stupid solutions --- compose_extends/docker-compose.base.yaml | 6 ++++++ {ComposeProjects => compose_projects}/statc-dc.yaml | 0 docker-compose.yml => docker-compose.yaml | 11 +++++------ 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 compose_extends/docker-compose.base.yaml rename {ComposeProjects => compose_projects}/statc-dc.yaml (100%) rename docker-compose.yml => docker-compose.yaml (83%) diff --git a/compose_extends/docker-compose.base.yaml b/compose_extends/docker-compose.base.yaml new file mode 100644 index 0000000..1913f27 --- /dev/null +++ b/compose_extends/docker-compose.base.yaml @@ -0,0 +1,6 @@ +services: + reverse: + image: nginx:stable-alpine + container_name: reverse + hostname: reverse + restart: always diff --git a/ComposeProjects/statc-dc.yaml b/compose_projects/statc-dc.yaml similarity index 100% rename from ComposeProjects/statc-dc.yaml rename to compose_projects/statc-dc.yaml diff --git a/docker-compose.yml b/docker-compose.yaml similarity index 83% rename from docker-compose.yml rename to docker-compose.yaml index b15c4b2..aaf14f9 100644 --- a/docker-compose.yml +++ b/docker-compose.yaml @@ -1,9 +1,8 @@ services: reverse: - image: nginx:stable-alpine - container_name: reverse - hostname: reverse - restart: always + extends: + file: compose_extends/docker-compose.base.yaml + service: reverse extra_hosts: - "host.docker.internal=host-gateway" volumes: @@ -15,11 +14,11 @@ services: - "./resources:/var/www/html/resources:ro" - "./ssl:/etc/nginx/ssl:ro" - "./logs:/var/log/nginx/" - networks: - services: {} ports: - 80:80 - 443:443 + networks: + - services networks: services: