From d8396d2331db7f7d8b45526dfeced459f9e8c313 Mon Sep 17 00:00:00 2001 From: Redume Date: Wed, 26 Feb 2025 15:29:01 +0300 Subject: [PATCH] chore: added docker compoe for docs --- docker-compose.yaml | 23 ++++++++++++++++++++++- docs/Dockerfile | 9 +++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 docs/Dockerfile diff --git a/docker-compose.yaml b/docker-compose.yaml index 38541e3..1e3fc58 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -8,10 +8,18 @@ services: - ./nginx/:/etc/nginx/ - ./CertSSL:/etc/nginx/ssl - ./assets/logo.png:/etc/nginx/assets/logo.png + - ./docs/dist:/usr/share/ depends_on: - server - chart - web + - docs + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost"] + interval: 10s + retries: 5 + start_period: 30s + timeout: 10s server: build: @@ -38,7 +46,7 @@ services: depends_on: postgres: condition: service_healthy - + web: build: context: ./ @@ -50,6 +58,19 @@ services: - './CertSSL:/CertSSL' - './config.yaml:/config.yaml' + docs: + build: + context: ./docs + dockerfile: Dockerfile + restart: unless-stopped + volumes: + - ./docs/dist:/docs/dist # Bind mount for the dist folder + healthcheck: + test: ["CMD", "test", "-f", "/docs/dist/.built"] # Check if the build is complete + interval: 5s + timeout: 10s + retries: 5 + collect-currency: build: context: ./ diff --git a/docs/Dockerfile b/docs/Dockerfile new file mode 100644 index 0000000..62188f5 --- /dev/null +++ b/docs/Dockerfile @@ -0,0 +1,9 @@ +FROM node:20-alpine + +WORKDIR / + +COPY ./package*.json . + +RUN npm install + +CMD ["npm", "run", "build"]