Merge pull request #483 from simple-login/chore/remove-sudo-docker

chore: remove sudo in running docker
This commit is contained in:
Son Nguyen Kim 2021-05-25 16:33:34 +02:00 committed by GitHub
commit 8262d3559d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -236,7 +236,7 @@ If you already have a Postgres database in use, you can skip this section and ju
Run a Postgres Docker container as your Postgres database server. Make sure to replace `myuser` and `mypassword` with something more secret. Run a Postgres Docker container as your Postgres database server. Make sure to replace `myuser` and `mypassword` with something more secret.
```bash ```bash
sudo docker run -d \ docker run -d \
--name sl-db \ --name sl-db \
-e POSTGRES_PASSWORD=mypassword \ -e POSTGRES_PASSWORD=mypassword \
-e POSTGRES_USER=myuser \ -e POSTGRES_USER=myuser \
@ -251,7 +251,7 @@ sudo docker run -d \
To test whether the database operates correctly or not, run the following command: To test whether the database operates correctly or not, run the following command:
```bash ```bash
sudo docker exec -it sl-db psql -U myuser simplelogin docker exec -it sl-db psql -U myuser simplelogin
``` ```
you should be logged in the postgres console. Type `exit` to exit postgres console. you should be logged in the postgres console. Type `exit` to exit postgres console.
@ -419,7 +419,7 @@ LOCAL_FILE_UPLOAD=1
Before running the webapp, you need to prepare the database by running the migration: Before running the webapp, you need to prepare the database by running the migration:
```bash ```bash
sudo docker run --rm \ docker run --rm \
--name sl-migration \ --name sl-migration \
-v $(pwd)/sl:/sl \ -v $(pwd)/sl:/sl \
-v $(pwd)/sl/upload:/code/static/upload \ -v $(pwd)/sl/upload:/code/static/upload \
@ -435,7 +435,7 @@ This command could take a while to download the `simplelogin/app` docker image.
Init data Init data
```bash ```bash
sudo docker run --rm \ docker run --rm \
--name sl-init \ --name sl-init \
-v $(pwd)/sl:/sl \ -v $(pwd)/sl:/sl \
-v $(pwd)/simplelogin.env:/code/.env \ -v $(pwd)/simplelogin.env:/code/.env \
@ -448,7 +448,7 @@ sudo docker run --rm \
Now, it's time to run the `webapp` container! Now, it's time to run the `webapp` container!
```bash ```bash
sudo docker run -d \ docker run -d \
--name sl-app \ --name sl-app \
-v $(pwd)/sl:/sl \ -v $(pwd)/sl:/sl \
-v $(pwd)/sl/upload:/code/static/upload \ -v $(pwd)/sl/upload:/code/static/upload \
@ -464,7 +464,7 @@ sudo docker run -d \
Next run the `email handler` Next run the `email handler`
```bash ```bash
sudo docker run -d \ docker run -d \
--name sl-email \ --name sl-email \
-v $(pwd)/sl:/sl \ -v $(pwd)/sl:/sl \
-v $(pwd)/sl/upload:/code/static/upload \ -v $(pwd)/sl/upload:/code/static/upload \