mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-17 13:55:08 +00:00
* docs: reorganize documentation structure into logical categories Restructure documentation into organized directories for better navigation: - getting-started/: Quick start guides for new users - setup/: Setup and configuration guides - production/: Production deployment guides (backup, TLS, multi-tenancy) - operations/: Site operations and management - development/: Development workflow guides - migration/: Migration guides - troubleshooting/: Troubleshooting guides - reference/: Reference documentation (container setup, build configs) Rename files for consistency: - Use kebab-case naming convention throughout - Remove numbered prefixes from container-setup files - Use descriptive names (backup-strategy, tls-ssl-setup, etc.) Update all internal cross-references to reflect new file locations. Update README.md with organized documentation structure. Fix image paths in development.md to use correct relative paths. * docs: add numeric prefixes to directories and files for navigation order Add numeric prefixes (01-08) to documentation directories to indicate reading order and flow for first-time users: - 01-getting-started: Quick start guides - 02-setup: Setup and configuration - 03-production: Production deployment - 04-operations: Site operations - 05-development: Development guides - 06-migration: Migration guides - 07-troubleshooting: Troubleshooting - 08-reference: Reference documentation Add numeric prefixes to files within directories to guide readers through documentation in a logical sequence. Update all cross-references throughout documentation to use new numbered paths. Update README.md to reflect the new structure. * docs: move container-setup to 02-setup and integrate setup-options content Move container-setup directory from 08-reference/ to 02-setup/ to follow PR feedback. The container-setup documentation provides a more linear and coherent flow compared to the previous unstructured setup files. Changes: - Move container-setup/ from docs/08-reference/ to docs/02-setup/ - Integrate content from setup-options.md into structured flow: - Create new 06-setup-examples.md with practical deployment scenarios - Enhance 03-start-setup.md with site creation details from setup-options - Remove redundant 01-setup-options.md (content now integrated) - Rename 02-single-server-example.md to 07-single-server-example.md - Update all cross-references throughout documentation: - Update README.md with new structure under Setup section - Fix links in site-operations.md and migration docs - Add navigation links between container-setup files and examples - Maintain container-setup's linear flow: overview → build → start → env → overrides - Add practical examples document (06-setup-examples.md) that follows the container-setup guide Result: Documentation now follows a clear progression from conceptual overview through practical examples, with all setup information properly organized under 02-setup/. * docs: remove container-setup subfolder and flatten structure Move all files from docs/02-setup/container-setup/ directly into docs/02-setup/ to eliminate unnecessary subfolder. Files are already numbered sequentially, so they work perfectly at the same level. Changes: - Move all files from container-setup/ subfolder to 02-setup/ root - Remove container-setup/ subfolder - Update all cross-references: - Update README.md paths (remove container-setup/ from all links) - Fix references in site-operations.md - Fix references in migration docs - Update internal references in 06-setup-examples.md - Fix relative path references in 01-overview.md, 02-build-setup.md, 03-start-setup.md Result: Cleaner, flatter structure with all numbered setup files at the same level, making navigation more straightforward. * fix: Pre-commit failure is fixed --------- Co-authored-by: adithya <adithya.a@bayesian.in>
79 lines
3.7 KiB
Markdown
79 lines
3.7 KiB
Markdown
1. [Fixing MariaDB issues after rebuilding the container](#fixing-mariadb-issues-after-rebuilding-the-container)
|
|
1. [docker-compose does not recognize variables from `.env` file](#docker-compose-does-not-recognize-variables-from-env-file)
|
|
1. [Windows Based Installation](#windows-based-installation)
|
|
|
|
### Fixing MariaDB issues after rebuilding the container
|
|
|
|
For any reason after rebuilding the container if you are not be able to access MariaDB correctly (i.e. `Access denied for user [...]`) with the previous configuration. Follow these instructions.
|
|
|
|
First test for network issues. Manually connect to the database through the `backend` container:
|
|
|
|
```
|
|
docker exec -it frappe_docker-backend-1 bash
|
|
mysql -uroot -padmin -hdb
|
|
```
|
|
|
|
Replace `root` with the database root user name, `admin` with the root password, and `db` with the service name specified in the docker-compose `.yml` configuration file. If the connection to the database is successful, then the network configuration is correct and you can proceed to the next step. Otherwise, modify the docker-compose `.yml` configuration file, in the `configurator` service's `environment` section, to use the container names (`frappe_docker-db-1`, `frappe_docker-redis-cache-1`, `frappe_docker-redis-queue-1` or as otherwise shown with `docker ps`) instead of the service names and rebuild the containers.
|
|
|
|
Then, the parameter `'db_name'@'%'` needs to be set in MariaDB and permission to the site database suitably assigned to the user.
|
|
|
|
This step has to be repeated for all sites available under the current bench.
|
|
Example shows the queries to be executed for site `localhost`
|
|
|
|
Open sites/localhost/site_config.json:
|
|
|
|
```shell
|
|
code sites/localhost/site_config.json
|
|
```
|
|
|
|
and take note of the parameters `db_name` and `db_password`.
|
|
|
|
Enter MariaDB Interactive shell:
|
|
|
|
```shell
|
|
mysql -uroot -padmin -hdb
|
|
```
|
|
|
|
The parameter `'db_name'@'%'` must not be duplicated. Verify that it is unique with the command:
|
|
|
|
```
|
|
SELECT User, Host FROM mysql.user;
|
|
```
|
|
|
|
Delete duplicated entries, if found, with the following:
|
|
|
|
```
|
|
DROP USER 'db_name'@'host';
|
|
```
|
|
|
|
Modify permissions by executing following queries replacing `db_name` and `db_password` with the values found in site_config.json.
|
|
|
|
```sql
|
|
-- if there is no user created already first try to created it using the next command
|
|
-- CREATE USER 'db_name'@'%' IDENTIFIED BY 'your_password';
|
|
-- skip the upgrade command below if you use the create command above
|
|
UPDATE mysql.global_priv SET Host = '%' where User = 'db_name'; FLUSH PRIVILEGES;
|
|
SET PASSWORD FOR 'db_name'@'%' = PASSWORD('db_password'); FLUSH PRIVILEGES;
|
|
GRANT ALL PRIVILEGES ON `db_name`.* TO 'db_name'@'%' IDENTIFIED BY 'db_password' WITH GRANT OPTION; FLUSH PRIVILEGES;
|
|
EXIT;
|
|
```
|
|
|
|
Note: For MariaDB 10.3 and older use `mysql.user` instead of `mysql.global_priv`.
|
|
|
|
### docker-compose does not recognize variables from `.env` file
|
|
|
|
If you are using old version of `docker-compose` the .env file needs to be located in directory from where the docker-compose command is executed. There may also be difference in official `docker-compose` and the one packaged by distro. Use `--env-file=.env` if available to explicitly specify the path to file.
|
|
|
|
### Windows Based Installation
|
|
|
|
- Set environment variable `COMPOSE_CONVERT_WINDOWS_PATHS` e.g. `set COMPOSE_CONVERT_WINDOWS_PATHS=1`
|
|
- While using docker machine, port-forward the ports of VM to ports of host machine. (ports 8080/8000/9000)
|
|
- Name all the sites ending with `.localhost`. and access it via browser locally. e.g. `http://site1.localhost`
|
|
|
|
### Redo installation
|
|
|
|
- If you have made changes and just want to start over again (abandoning all changes), remove all docker
|
|
- containers
|
|
- images
|
|
- volumes
|
|
- Install a fresh
|