mirror of https://github.com/VERT-sh/VERT.git
Merge pull request #66 from azurejelly/main
docs: update docker instructions
This commit is contained in:
commit
4d616a9bfa
24
README.md
24
README.md
|
@ -59,7 +59,7 @@ If using nginx, you can use the [nginx.conf](./nginx.conf) file as a starting po
|
|||
|
||||
Clone the repository, then build a Docker image with:
|
||||
```shell
|
||||
$ docker build -t VERT-sh/vert \
|
||||
$ docker build -t vert-sh/vert \
|
||||
--build-arg PUB_ENV=production \
|
||||
--build-arg PUB_HOSTNAME=vert.sh \
|
||||
--build-arg PUB_PLAUSIBLE_URL=https://plausible.example.com .
|
||||
|
@ -67,10 +67,28 @@ $ docker build -t VERT-sh/vert \
|
|||
|
||||
You can then run it by using:
|
||||
```shell
|
||||
$ docker run --restart unless-stopped -p 3000:3000 -d --name "vert" VERT-sh/vert
|
||||
$ docker run -d \
|
||||
--restart unless-stopped \
|
||||
-p 3000:80 \
|
||||
--name "vert" \
|
||||
vert-sh/vert
|
||||
```
|
||||
|
||||
We also have a `docker-compose.yml` file available. Use `docker compose up` if you want to start the stack, or `docker compose down` to bring it down. You can pass `--build` to `docker compose up` to rebuild the Docker image (useful if you've changed any of the environment variables) as well as `-d` to start it in detached mode. You can read more about Docker Compose in general [here](https://docs.docker.com/compose/intro/compose-application-model/).
|
||||
This will do the following:
|
||||
- Use the previously built image as the container `vert`, in detached mode
|
||||
- Continuously restart the container until manually stopped
|
||||
- Map `3000/tcp` (host) to `80/tcp` (container)
|
||||
|
||||
We also have a [`docker-compose.yml`](./docker-compose.yml) file available. Use `docker compose up` if you want to start the stack, or `docker compose down` to bring it down. You can pass `--build` to `docker compose up` to rebuild the Docker image (useful if you've changed any of the environment variables) as well as `-d` to start it in detached mode. You can read more about Docker Compose in general [here](https://docs.docker.com/compose/intro/compose-application-model/).
|
||||
|
||||
While there's an image you can pull instead of cloning the repo and building the image yourself, you will not be able to update any of the environment variables (e.g. `PUB_PLAUSIBLE_URL`) as they're baked directly into the image and not obtained during runtime. If you're okay with this, you can simply run this command instead:
|
||||
```shell
|
||||
$ docker run -d \
|
||||
--restart unless-stopped \
|
||||
-p 3000:80 \
|
||||
--name "vert" \
|
||||
ghcr.io/vert-sh/vert:latest
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
services:
|
||||
vert:
|
||||
container_name: vert
|
||||
image: VERT-sh/vert:latest
|
||||
image: vert-sh/vert:latest
|
||||
environment:
|
||||
- PUB_HOSTNAME=${PUB_HOSTNAME:-vert.sh}
|
||||
- PUB_PLAUSIBLE_URL=${PUB_PLAUSIBLE_URL:-https://plausible.example.com}
|
||||
|
|
Loading…
Reference in New Issue