Updated to newest Docker version syntax
This commit is contained in:
parent
25115a6fae
commit
73f31016fd
12
README.md
12
README.md
@ -16,7 +16,7 @@ The clien is designed to work on a server.
|
||||
|
||||
- A Debian- or Ubuntu-based server, preferably the latest distribution.
|
||||
- Docker (specifically, Docker Engine)
|
||||
- Docker-Compose
|
||||
- Docker Compose
|
||||
- Git
|
||||
|
||||
### Installation
|
||||
@ -28,9 +28,13 @@ The first step is to ensure all the prerequisites are available on the server.
|
||||
To set up the server, consult some of the comprehensive guides on various hosting platforms like Linode or DigitalOcean.
|
||||
Here is a [good starting point on setting up a server](https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-22-04).
|
||||
|
||||
To install Docker and Docker-Compose, consult the respective documentation:
|
||||
To install Docker and Docker Compose, consult the respective documentation:
|
||||
- [Install on Ubuntu](https://docs.docker.com/engine/install/ubuntu/) or [Install on Debian](https://docs.docker.com/engine/install/debian/)
|
||||
- [Install Docker-Compose](https://github.com/docker/compose) as per these instructions.
|
||||
- Docker Compose should be installed as part of that.
|
||||
|
||||
```
|
||||
At the time of writing, there has been an upgrade to Docker and Docker Compose, meaning the syntax below might be different between versions.
|
||||
```
|
||||
|
||||
Check if Git is installed on your server using the `git --version` command.
|
||||
If it isn't installed, install it.
|
||||
@ -131,7 +135,7 @@ Everything should be good to run on autopilot at this point.
|
||||
Navigate to the root folder of the app, the folder where you have `install-script.sh` and `docker-compose.yml`.
|
||||
Run the following command:
|
||||
|
||||
```sudo docker-compose up -d```
|
||||
```sudo docker compose up -d```
|
||||
|
||||
And you should have the stack running.
|
||||
You can register in the app and begin using it.
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
# Source https://pentacent.medium.com/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71
|
||||
|
||||
if ! [ -x "$(command -v docker-compose)" ]; then
|
||||
echo 'Error: docker-compose is not installed.' >&2
|
||||
if ! [ -x "$(command -v docker compose)" ]; then
|
||||
echo 'Error: docker compose is not installed.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -22,7 +22,7 @@ fi
|
||||
|
||||
if [ ! -e "$data_path/ssl-dhparams.pem" ]; then
|
||||
echo "### Generating ssl-dhparams.pem ..."
|
||||
docker-compose run --rm --entrypoint "\
|
||||
docker compose run --rm --entrypoint "\
|
||||
openssl dhparam 4096 -out /etc/letsencrypt/ssl-dhparams.pem" certbot
|
||||
echo
|
||||
fi
|
||||
@ -30,7 +30,7 @@ fi
|
||||
echo "### Creating dummy certificate for $domains ..."
|
||||
path="/etc/letsencrypt/live/$domains"
|
||||
mkdir -p "$data_path/conf/live/$domains"
|
||||
docker-compose run --rm --entrypoint "\
|
||||
docker compose run --rm --entrypoint "\
|
||||
openssl req -x509 -nodes -newkey rsa:$rsa_key_size -days 1\
|
||||
-keyout '$path/privkey.pem' \
|
||||
-out '$path/fullchain.pem' \
|
||||
@ -38,11 +38,11 @@ docker-compose run --rm --entrypoint "\
|
||||
echo
|
||||
|
||||
echo "### Starting nginx ..."
|
||||
docker-compose up --force-recreate -d nginx
|
||||
docker compose up --force-recreate -d nginx
|
||||
echo
|
||||
|
||||
echo "### Deleting dummy certificate for $domains ..."
|
||||
docker-compose run --rm --entrypoint "\
|
||||
docker compose run --rm --entrypoint "\
|
||||
rm -Rf /etc/letsencrypt/live/$domains && \
|
||||
rm -Rf /etc/letsencrypt/archive/$domains && \
|
||||
rm -Rf /etc/letsencrypt/renewal/$domains.conf" certbot
|
||||
@ -64,7 +64,7 @@ esac
|
||||
# Enable staging mode if needed
|
||||
if [ $staging != "0" ]; then staging_arg="--staging"; fi
|
||||
|
||||
docker-compose run --rm --entrypoint "\
|
||||
docker compose run --rm --entrypoint "\
|
||||
certbot certonly --webroot -w /var/www/certbot \
|
||||
$staging_arg \
|
||||
$email_arg \
|
||||
@ -75,4 +75,4 @@ docker-compose run --rm --entrypoint "\
|
||||
echo
|
||||
|
||||
echo "### Reloading nginx ..."
|
||||
docker-compose exec nginx nginx -s reload
|
||||
docker compose exec nginx nginx -s reload
|
||||
|
Loading…
Reference in New Issue
Block a user