Skip to content

Commit

Permalink
Update docker-compose command to docker compose
Browse files Browse the repository at this point in the history
Compose is part of docker command for years and during local development
 on Mac I have to change makefile locally for commands to work.
  • Loading branch information
paskal committed Oct 20, 2024
1 parent 4d5f9f2 commit 8ddcadb
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions backend/_example/memory_store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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.
4 changes: 2 additions & 2 deletions compose-dev-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions compose-dev-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ 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

### Development

```shell
docker-compose up --build server
docker compose up --build server
```

Then head to http://localhost:8080
2 changes: 1 addition & 1 deletion site/src/docs/configuration/email/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion site/src/docs/contributing/backend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://127.0.0.1:8080/web/>. 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.
Expand Down
4 changes: 2 additions & 2 deletions site/src/docs/contributing/frontend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 <http://127.0.0.1:8080/web/>, 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 <http://127.0.0.1:8080/web/>, 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
Expand Down
2 changes: 1 addition & 1 deletion site/src/docs/contributing/translations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://127.0.0.1:8080/web/>, 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 <http://127.0.0.1:8080> with your translation in place
Expand Down
4 changes: 2 additions & 2 deletions site/src/docs/getting-started/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion site/src/docs/manuals/reproxy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions site/src/docs/manuals/subdomain/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

Expand Down

0 comments on commit 8ddcadb

Please sign in to comment.