From 9a64cd2f4e39fe561926a8b5dfebac58ff247d02 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 16 Oct 2022 00:36:04 +0200 Subject: factor out common settings in docker-compose.yml --- docker-compose.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4aa183b..c8bf37f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,14 @@ -version: '3' +version: '3.4' + +x-default-settings: + &default-settings + logging: + driver: journald + restart: unless-stopped services: cgitize: + << : *default-settings build: context: . dockerfile: docker/Dockerfile @@ -9,21 +16,16 @@ services: # Every 3 hours: SCHEDULE: '0 */3 * * *' image: egortensin/cgitize:latest - logging: - driver: journald - restart: unless-stopped volumes: - ./examples/docker:/etc/cgitize:ro - repositories:/mnt/cgitize frontend: + << : *default-settings build: context: ./docker/frontend image: egortensin/cgitize-frontend:latest - logging: - driver: journald ports: - '127.0.0.1:80:80' - restart: unless-stopped volumes: - repositories:/mnt/cgitize:ro -- cgit v1.2.3