2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-08 06:15:26 +00:00

fix: new-site command (#1260)

fix command usage and docs

fixes issue#1256
This commit is contained in:
Revant Nandgaonkar 2023-10-30 11:45:55 +05:30 committed by GitHub
parent ead5438ebb
commit 2e99af1a3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 13 deletions

View File

@ -140,7 +140,7 @@ sed -i '/redis/d' ./Procfile
You can create a new site with the following command: You can create a new site with the following command:
```shell ```shell
bench new-site sitename --no-mariadb-socket bench new-site --no-mariadb-socket sitename
``` ```
sitename MUST end with .localhost for trying deployments locally. sitename MUST end with .localhost for trying deployments locally.
@ -148,13 +148,13 @@ sitename MUST end with .localhost for trying deployments locally.
for example: for example:
```shell ```shell
bench new-site development.localhost --no-mariadb-socket bench new-site --no-mariadb-socket development.localhost
``` ```
The same command can be run non-interactively as well: The same command can be run non-interactively as well:
```shell ```shell
bench new-site development.localhost --mariadb-root-password 123 --admin-password admin --no-mariadb-socket bench new-site --mariadb-root-password 123 --admin-password admin --no-mariadb-socket development.localhost
``` ```
The command will ask the MariaDB root password. The default root password is `123`. The command will ask the MariaDB root password. The default root password is `123`.
@ -167,7 +167,7 @@ To setup site with PostgreSQL as database use option `--db-type postgres` and `-
Example: Example:
```shell ```shell
bench new-site mypgsql.localhost --db-type postgres --db-host postgresql bench new-site --db-type postgres --db-host postgresql mypgsql.localhost
``` ```
To avoid entering postgresql username and root password, set it in `common_site_config.json`, To avoid entering postgresql username and root password, set it in `common_site_config.json`,

View File

@ -106,7 +106,7 @@ create-site:
fi fi
done; done;
echo "sites/common_site_config.json found"; echo "sites/common_site_config.json found";
bench new-site frontend --no-mariadb-socket --admin-password=admin --db-root-password=admin --install-app erpnext --set-default; bench new-site --no-mariadb-socket --admin-password=admin --db-root-password=admin --install-app erpnext --set-default frontend;
# ... removed for brevity # ... removed for brevity
``` ```

View File

@ -81,7 +81,7 @@ services:
fi fi
done; done;
echo "sites/common_site_config.json found"; echo "sites/common_site_config.json found";
bench new-site frontend --no-mariadb-socket --admin-password=admin --db-root-password=admin --install-app erpnext --set-default; bench new-site --no-mariadb-socket --admin-password=admin --db-root-password=admin --install-app erpnext --set-default frontend;
db: db:
image: mariadb:10.6 image: mariadb:10.6

View File

@ -175,7 +175,7 @@ Create sites `one.example.com` and `two.example.com`:
```shell ```shell
# one.example.com # one.example.com
docker compose --project-name erpnext-one exec backend \ docker compose --project-name erpnext-one exec backend \
bench new-site one.example.com --no-mariadb-socket --mariadb-root-password changeit --install-app erpnext --admin-password changeit bench new-site --no-mariadb-socket --mariadb-root-password changeit --install-app erpnext --admin-password changeit one.example.com
``` ```
You can stop here and have a single bench single site setup complete. Continue to add one more site to the current bench. You can stop here and have a single bench single site setup complete. Continue to add one more site to the current bench.
@ -183,7 +183,7 @@ You can stop here and have a single bench single site setup complete. Continue t
```shell ```shell
# two.example.com # two.example.com
docker compose --project-name erpnext-one exec backend \ docker compose --project-name erpnext-one exec backend \
bench new-site two.example.com --no-mariadb-socket --mariadb-root-password changeit --install-app erpnext --admin-password changeit bench new-site --no-mariadb-socket --mariadb-root-password changeit --install-app erpnext --admin-password changeit two.example.com
``` ```
#### Create second bench #### Create second bench
@ -234,10 +234,10 @@ Create sites `three.example.com` and `four.example.com`:
```shell ```shell
# three.example.com # three.example.com
docker compose --project-name erpnext-two exec backend \ docker compose --project-name erpnext-two exec backend \
bench new-site three.example.com --no-mariadb-socket --mariadb-root-password changeit --install-app erpnext --admin-password changeit bench new-site --no-mariadb-socket --mariadb-root-password changeit --install-app erpnext --admin-password changeit three.example.com
# four.example.com # four.example.com
docker compose --project-name erpnext-two exec backend \ docker compose --project-name erpnext-two exec backend \
bench new-site four.example.com --no-mariadb-socket --mariadb-root-password changeit --install-app erpnext --admin-password changeit bench new-site --no-mariadb-socket --mariadb-root-password changeit --install-app erpnext --admin-password changeit four.example.com
``` ```
#### Create custom domain to existing site #### Create custom domain to existing site

View File

@ -9,7 +9,7 @@ Note:
- Wait for the `db` service to start and `configurator` to exit before trying to create a new site. Usually this takes up to 10 seconds. - Wait for the `db` service to start and `configurator` to exit before trying to create a new site. Usually this takes up to 10 seconds.
```sh ```sh
docker-compose exec backend bench new-site <site-name> --no-mariadb-socket --mariadb-root-password <db-password> --admin-password <admin-password> docker-compose exec backend bench new-site --no-mariadb-socket --mariadb-root-password <db-password> --admin-password <admin-password> <site-name>
``` ```
If you need to install some app, specify `--install-app`. To see all options, just run `bench new-site --help`. If you need to install some app, specify `--install-app`. To see all options, just run `bench new-site --help`.
@ -24,7 +24,7 @@ docker-compose exec backend bench set-config -g root_password <root-password>
Also command is slightly different: Also command is slightly different:
```sh ```sh
docker-compose exec backend bench new-site <site-name> --no-mariadb-socket --db-type postgres --admin-password <admin-password> docker-compose exec backend bench new-site --no-mariadb-socket --db-type postgres --admin-password <admin-password> <site-name>
``` ```
## Push backup to S3 storage ## Push backup to S3 storage

View File

@ -67,7 +67,7 @@ services:
fi fi
done; done;
echo "sites/common_site_config.json found"; echo "sites/common_site_config.json found";
bench new-site frontend --no-mariadb-socket --admin-password=admin --db-root-password=admin --install-app erpnext --set-default; bench new-site --no-mariadb-socket --admin-password=admin --db-root-password=admin --install-app erpnext --set-default frontend;
db: db:
image: mariadb:10.6 image: mariadb:10.6