From 8ddcadb345d401c7c8b171c3068b19f8a8036999 Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Sun, 20 Oct 2024 21:59:57 +0100 Subject: [PATCH] Update docker-compose command to docker compose Compose is part of docker command for years and during local development on Mac I have to change makefile locally for commands to work. --- Makefile | 8 ++++---- backend/_example/memory_store/README.md | 6 +++--- compose-dev-backend.yml | 4 ++-- compose-dev-frontend.yml | 4 ++-- docker-compose.yml | 2 +- site/README.md | 6 +++--- site/src/docs/configuration/email/index.md | 2 +- site/src/docs/contributing/backend/index.md | 2 +- site/src/docs/contributing/frontend/index.md | 4 ++-- site/src/docs/contributing/translations/index.md | 2 +- site/src/docs/getting-started/installation/index.md | 4 ++-- site/src/docs/manuals/reproxy/index.md | 2 +- site/src/docs/manuals/subdomain/index.md | 4 ++-- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 680717763b..620dc3728f 100644 --- a/Makefile +++ b/Makefile @@ -39,15 +39,15 @@ race_test: cd backend/app && go test -race -timeout=60s -count 1 ./... backend: - docker-compose -f compose-dev-backend.yml build + docker compose -f compose-dev-backend.yml build frontend: - docker-compose -f compose-dev-frontend.yml build + docker compose -f compose-dev-frontend.yml build rundev: SKIP_BACKEND_TEST=true SKIP_FRONTEND_TEST=true GITHUB_REF=$(GITHUB_REF) GITHUB_SHA=$(GITHUB_SHA) CI=true \ - docker-compose -f compose-private.yml build - docker-compose -f compose-private.yml up + docker compose -f compose-private.yml build + docker compose -f compose-private.yml up e2e: docker compose -f compose-e2e-test.yml up --build --quiet-pull --exit-code-from tests diff --git a/backend/_example/memory_store/README.md b/backend/_example/memory_store/README.md index 8e0654a6cf..2dd978c584 100644 --- a/backend/_example/memory_store/README.md +++ b/backend/_example/memory_store/README.md @@ -4,9 +4,9 @@ In order to run remark42 with memory_store copy provided `compose-dev-memstore.yml` to the root directory and run: -1. `docker-compose -f compose-dev-memstore.yml build` -1. `docker-compose -f compose-dev-memstore.yml up` +1. `docker compose -f compose-dev-memstore.yml build` +1. `docker compose -f compose-dev-memstore.yml up` As usual, demo site will run on http://127.0.0.1:8080/web/ -note: in order to work with the latest (current) version of master `go.mod` uses replacement directive for the backend package. In real-life usage `replace github.com/umputun/remark42/backend => ../../` should not be used. \ No newline at end of file +note: in order to work with the latest (current) version of master `go.mod` uses replacement directive for the backend package. In real-life usage `replace github.com/umputun/remark42/backend => ../../` should not be used. diff --git a/compose-dev-backend.yml b/compose-dev-backend.yml index 2a14fa8610..fe9699adc0 100644 --- a/compose-dev-backend.yml +++ b/compose-dev-backend.yml @@ -2,8 +2,8 @@ # starts backend on 8080 with basic auth "dev:password" and Dev oauth2 provider on port 8084 # UI on http://127.0.0.1:8080/web # -# build remark42 docker image - docker-compose -f compose-dev-backend.yml build -# start remark42 service - docker-compose -f compose-dev-backend.yml up +# build remark42 docker image - docker compose -f compose-dev-backend.yml build +# start remark42 service - docker compose -f compose-dev-backend.yml up version: "2" services: diff --git a/compose-dev-frontend.yml b/compose-dev-frontend.yml index 1908d695eb..e6e420b305 100644 --- a/compose-dev-frontend.yml +++ b/compose-dev-frontend.yml @@ -2,8 +2,8 @@ # starts backend on 8080 with basic auth "dev:password" and Dev oauth2 provider on port 8084 # UI on http://127.0.0.1:8080/web # -# build remark42 docker image - docker-compose -f compose-dev-frontend.yml build -# start remark42 service - docker-compose -f compose-dev-frontend.yml up +# build remark42 docker image - docker compose -f compose-dev-frontend.yml build +# start remark42 service - docker compose -f compose-dev-frontend.yml up version: "2" services: diff --git a/docker-compose.yml b/docker-compose.yml index df615681d3..9ec5af5f59 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "2" services: remark: - # remove the next line in case you want to use this docker-compose separately + # remove the next line in case you want to use this Docker Compose file separately # as otherwise it would complain for absence of Dockerfile build: . image: umputun/remark42:latest diff --git a/site/README.md b/site/README.md index 289c1414f1..813b255897 100644 --- a/site/README.md +++ b/site/README.md @@ -29,8 +29,8 @@ yarn build Install dependencies and run development server inside Docker: ```shell -docker-compose build -docker-compose up server +docker compose build +docker compose up server ``` Then serve files from `./build` with your favorite server @@ -38,7 +38,7 @@ Then serve files from `./build` with your favorite server ### Development ```shell -docker-compose up --build server +docker compose up --build server ``` Then head to http://localhost:8080 diff --git a/site/src/docs/configuration/email/index.md b/site/src/docs/configuration/email/index.md index 94c5013598..39d68d2468 100644 --- a/site/src/docs/configuration/email/index.md +++ b/site/src/docs/configuration/email/index.md @@ -201,7 +201,7 @@ Now we have the following templates: - `email_unsubscribe.html.tmpl` – used for notification about successful unsubscribing from replies - `error_response.html.tmpl` – used for HTML errors -To replace any template, add the file with the same name to the directory with the remark42 executable file. In case you run Remark42 inside docker-compose, you can put customised templates into a directory like `customised_templates` and then mount it like that: +To replace any template, add the file with the same name to the directory with the remark42 executable file. In case you run Remark42 inside Docker Compose, you can put customised templates into a directory like `customised_templates` and then mount it like that: ```yaml volumes: diff --git a/site/src/docs/contributing/backend/index.md b/site/src/docs/contributing/backend/index.md index 00f7eee497..694e8b9ae0 100644 --- a/site/src/docs/contributing/backend/index.md +++ b/site/src/docs/contributing/backend/index.md @@ -11,7 +11,7 @@ cp compose-dev-backend.yml compose-private.yml # now, edit / debug `compose-private.yml` to your heart's content # build and run -docker-compose -f compose-private.yml up --build +docker compose -f compose-private.yml up --build ``` It starts Remark42 on `127.0.0.1:8080` and adds local OAuth2 provider "Dev". To access the UI demo page go to . By default, you would be logged in as `dev_user`, defined as admin. You can tweak any of the [supported parameters](https://remark42.com/docs/configuration/parameters/) in corresponded yml file. diff --git a/site/src/docs/contributing/frontend/index.md b/site/src/docs/contributing/frontend/index.md index 323b78d83c..ae9e35ebc1 100644 --- a/site/src/docs/contributing/frontend/index.md +++ b/site/src/docs/contributing/frontend/index.md @@ -59,7 +59,7 @@ cp compose-dev-frontend.yml compose-private.yml # now, edit / debug `compose-private.yml` to your heart's content # build and run -docker-compose -f compose-private.yml up --build +docker compose -f compose-private.yml up --build ``` Then in the new terminal tab or window, run the following to start the frontend with Hot Reloading: @@ -78,7 +78,7 @@ It starts Remark42 backend on `127.0.0.1:8080` and adds local OAuth2 provider "D Frontend Docker Compose config (`compose-dev-frontend.yml`) by default skips running backend related tests. ::: note 🚨 -Before submitting your changes as a Pull Request, run the backend using the `docker-compose -f compose-dev-frontend.yml build --build-arg SKIP_FRONTEND_BUILD=""; docker-compose -f compose-private.yml up` command and test your changes against , frontend, built statically (unlike frontend on port 9000, which runs dynamically). That is how Remark42 authors will test your changes once you submit them. +Before submitting your changes as a Pull Request, run the backend using the `docker compose -f compose-dev-frontend.yml build --build-arg SKIP_FRONTEND_BUILD=""; docker compose -f compose-private.yml up` command and test your changes against , frontend, built statically (unlike frontend on port 9000, which runs dynamically). That is how Remark42 authors will test your changes once you submit them. ::: ## Static build diff --git a/site/src/docs/contributing/translations/index.md b/site/src/docs/contributing/translations/index.md index 9827e26a76..08966dfe51 100644 --- a/site/src/docs/contributing/translations/index.md +++ b/site/src/docs/contributing/translations/index.md @@ -41,7 +41,7 @@ below to have your translation available to all remark42 users and included in t 1. Uncomment `locale: "ru"` line in [frontend/apps/remark42/templates/demo.ejs](https://github.com/umputun/remark42/blob/master/frontend/apps/remark42/templates/demo.ejs) and replace `ru` with your translation language code 2. [Run remark42 in Docker](https://github.com/umputun/remark42#development) by issuing the following commands from the root directory of your remark42 fork: - `shell docker-compose -f compose-dev-frontend.yml build docker-compose -f compose-dev-frontend.yml up ` + `shell docker compose -f compose-dev-frontend.yml build docker compose -f compose-dev-frontend.yml up ` 3. open , log in, make a comment, make a reply to a comment, and make sure your translation looks as you expect it to look 4. make a screenshot from with your translation in place diff --git a/site/src/docs/getting-started/installation/index.md b/site/src/docs/getting-started/installation/index.md index 63f385fc25..cac1f14945 100644 --- a/site/src/docs/getting-started/installation/index.md +++ b/site/src/docs/getting-started/installation/index.md @@ -10,8 +10,8 @@ _This is the recommended way to run Remark42_ - copy provided [`docker-compose.yml`](https://github.com/umputun/remark42/blob/master/docker-compose.yml) and customize for your needs - make sure you **don't keep** `ADMIN_PASSWD=something...` for any non-development deployments -- pull prepared images from the Docker Hub and start - `docker-compose pull && docker-compose up -d` -- alternatively, compile from the sources - `docker-compose build && docker-compose up -d` +- pull prepared images from the Docker Hub and start - `docker compose pull && docker compose up -d` +- alternatively, compile from the sources - `docker compose build && docker compose up -d` ### Installation with Binary diff --git a/site/src/docs/manuals/reproxy/index.md b/site/src/docs/manuals/reproxy/index.md index 3e9f71fb38..64086d0d57 100644 --- a/site/src/docs/manuals/reproxy/index.md +++ b/site/src/docs/manuals/reproxy/index.md @@ -4,7 +4,7 @@ title: Configure with Reproxy ## How to configure remark42 with [Reproxy](https://reproxy.io) -Example of Reproxy configuration (reverse proxy) running remark42 service on remark42.example.com with docker compose. Reproxy handles SSL termination with LE and gzip all the responses. +Example of Reproxy configuration (reverse proxy) running remark42 service on remark42.example.com with Docker Compose. Reproxy handles SSL termination with LE and gzip all the responses. ```yaml version: "3.4" diff --git a/site/src/docs/manuals/subdomain/index.md b/site/src/docs/manuals/subdomain/index.md index 7c4e991788..2ac449f7e6 100644 --- a/site/src/docs/manuals/subdomain/index.md +++ b/site/src/docs/manuals/subdomain/index.md @@ -15,9 +15,9 @@ All documentation examples show configurations with remark42 on its own subdomai - Google Authorized redirect URIs: `https://example.com/remark42/auth/google/callback` - GitHub Authorised callback URL: `https://example.com/remark42/auth/github/callback` -### docker-compose configuration +### Docker Compose configuration -Both Nginx and Caddy configuration below rely on remark42 available on hostname `remark42`, which is achieved by having `container_name: remark42` in docker-compose. +Both Nginx and Caddy configuration below rely on remark42 available on hostname `remark42`, which is achieved by having `container_name: remark42` in Docker Compose configuration file. Example `docker-compose.yml`: