Skip to content

Commit

Permalink
Avoid enforcing not-needed quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
minottic committed Mar 28, 2024
1 parent 682654f commit 3fb4a18
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 70 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/docker_compose_test.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: "Docker Compose CI"
name: Docker Compose CI

"on": # 'on' is a truthy value normally, quotes are needed
on: # yamllint disable-line rule:truthy
push:
branches:
- "master"
- master
pull_request:
branches:
- "master"
- master
jobs:
test:
runs-on: "ubuntu-latest"
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v3"
- name: "Install 'yamllint'"
run: "sudo apt-get install -y yamllint"
- name: "Lint YAML files"
run: "yamllint -c .github/yamllint_config.yaml ."
- name: "Test docker-compose.yaml"
run: "docker compose up --wait --wait-timeout 300"
- uses: actions/checkout@v3
- name: Install 'yamllint'
run: sudo apt-get install -y yamllint
- name: Lint YAML files
run: yamllint -c .github/yamllint_config.yaml .
- name: Test docker-compose.yaml
run: docker compose up --wait --wait-timeout 300
8 changes: 4 additions & 4 deletions .github/yamllint_config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---

extends: "default"
extends: default

rules:
quoted-strings:
required: true
quote-type: "double"
document-start: "disable"
required: only-when-needed
quote-type: double
document-start: disable
16 changes: 8 additions & 8 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: "3"
version: '3'
include:
- "./services/mongodb/docker-compose.yaml"
- "./services/rabbitmq/docker-compose.yaml"
- "./services/backend/docker-compose.yaml"
- "./services/frontend/docker-compose.yaml"
- "./services/searchapi/docker-compose.yaml"
- "./services/archivemock/docker-compose.yaml"
- "./services/proxy/docker-compose.yaml"
- ./services/mongodb/docker-compose.yaml
- ./services/rabbitmq/docker-compose.yaml
- ./services/backend/docker-compose.yaml
- ./services/frontend/docker-compose.yaml
- ./services/searchapi/docker-compose.yaml
- ./services/archivemock/docker-compose.yaml
- ./services/proxy/docker-compose.yaml
8 changes: 4 additions & 4 deletions services/archivemock/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
services:
archivemock:
build: "https://github.com/SwissOpenEM/ScicatArchiveMock.git"
build: https://github.com/SwissOpenEM/ScicatArchiveMock.git
depends_on:
rabbitmq:
condition: "service_healthy"
condition: service_healthy
backend:
condition: "service_healthy"
condition: service_healthy
env_file:
- "./config/.env"
- ./config/.env
24 changes: 12 additions & 12 deletions services/backend/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
services:
backend:
image: "scicatproject/backend:v0.0.5"
image: scicatproject/backend:v0.0.5
depends_on:
mongodb:
condition: "service_started"
condition: service_started
rabbitmq:
condition: "service_healthy"
condition: service_healthy
volumes:
- "./config/config.local.js:/usr/src/app/server/config.local.js"
- "./config/datasources.json:/usr/src/app/server/datasources.json"
- "./config/providers.json:/usr/src/app/server/providers.json"
- "./config/component-config.local.json:/usr/src/app/server/component-config.local.json"
- ./config/config.local.js:/usr/src/app/server/config.local.js
- ./config/datasources.json:/usr/src/app/server/datasources.json
- ./config/providers.json:/usr/src/app/server/providers.json
- ./config/component-config.local.json:/usr/src/app/server/component-config.local.json
labels:
- "traefik.http.routers.backend.rule=Host(`backend.localhost`)"
- traefik.http.routers.backend.rule=Host(`backend.localhost`)
healthcheck:
test: "wget --spider 'http://127.0.0.1:3000/'"
start_period: "5s"
interval: "30s"
timeout: "10s"
test: wget --spider 'http://127.0.0.1:3000/'
start_period: 5s
interval: 30s
timeout: 10s
retries: 5
8 changes: 4 additions & 4 deletions services/frontend/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
services:
frontend:
image: "scicatproject/frontend:v4.0.0"
image: scicatproject/frontend:v4.0.0
depends_on:
backend:
condition: "service_healthy"
condition: service_healthy
volumes:
- "./config/config.json:/usr/share/nginx/html/assets/config.json"
- ./config/config.json:/usr/share/nginx/html/assets/config.json
labels:
- "traefik.http.routers.frontend.rule=Host(`localhost`)"
- traefik.http.routers.frontend.rule=Host(`localhost`)
10 changes: 5 additions & 5 deletions services/mongodb/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
services:
mongodb:
image: "mongo:7.0"
image: mongo:7.0
volumes:
- "mongodb_data:/data/db"
- "./config/init.js:/docker-entrypoint-initdb.d/init.js"
- "./config/seed:/seed"
- mongodb_data:/data/db
- ./config/init.js:/docker-entrypoint-initdb.d/init.js
- ./config/seed:/seed

volumes:
mongodb_data:
driver: "local"
driver: local
16 changes: 8 additions & 8 deletions services/proxy/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
services:
proxy:
image: "traefik:2.5"
command: >-
--api.insecure=true
--providers.docker=true
--entrypoints.web.address=:80
image: traefik:2.5
command:
- --api.insecure=true
- --providers.docker=true
- --entrypoints.web.address=:80
ports:
- "80:80"
- "8080:8080"
- 80:80
- 8080:8080
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- /var/run/docker.sock:/var/run/docker.sock
18 changes: 9 additions & 9 deletions services/rabbitmq/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
services:
rabbitmq:
image: "rabbitmq:3.13-management-alpine"
image: rabbitmq:3.13-management-alpine
labels:
- "traefik.http.routers.rabbitmq.rule=Host(`rabbitmq.localhost`)"
- "traefik.http.services.rabbitmq.loadbalancer.server.port=15672"
- traefik.http.routers.rabbitmq.rule=Host(`rabbitmq.localhost`)
- traefik.http.services.rabbitmq.loadbalancer.server.port=15672
volumes:
- "rabbitmq_data:/bitnami"
- rabbitmq_data:/bitnami
healthcheck:
test: "rabbitmq-diagnostics -q ping"
start_period: "5s"
interval: "30s"
timeout: "10s"
test: rabbitmq-diagnostics -q ping
start_period: 5s
interval: 30s
timeout: 10s
retries: 5

volumes:
rabbitmq_data:
driver: "local"
driver: local
8 changes: 4 additions & 4 deletions services/searchapi/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
services:
searchapi:
image: "dacat/panosc-search-api:latest"
image: dacat/panosc-search-api:latest
depends_on:
- "backend"
- backend
labels:
- "traefik.http.routers.searchapi.rule=Host(`searchapi.localhost`)"
- traefik.http.routers.searchapi.rule=Host(`searchapi.localhost`)
env_file:
- "./config/.env"
- ./config/.env

0 comments on commit 3fb4a18

Please sign in to comment.