mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-18 22:25:09 +00:00
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/.
62 lines
2.3 KiB
Markdown
62 lines
2.3 KiB
Markdown
# start Container
|
|
|
|
Once your compose file is ready, start all containers with a single command:
|
|
|
|
```bash
|
|
docker compose -p frappe -f compose.custom.yaml up -d
|
|
```
|
|
|
|
```bash
|
|
podman-compose --in-pod=1 --project-name frappe -f compose.custom.yaml up -d
|
|
```
|
|
|
|
The `-p` (or `--project-name`) flag names the project `frappe`, allowing you to easily reference and manage all containers together.
|
|
|
|
# Create a site and install apps
|
|
|
|
Frappe is now running, but it's not yet configured. You need to create a site and install your apps.
|
|
|
|
## Basic site creation
|
|
|
|
```bash
|
|
docker compose -p frappe exec backend bench new-site <sitename> --mariadb-user-host-login-scope='172.%.%.%'
|
|
docker compose -p frappe exec backend bench --site <sitename> install-app erpnext
|
|
```
|
|
|
|
```bash
|
|
podman exec -ti erpnext_backend_1 /bin/bash
|
|
bench new-site <sitename> --mariadb-user-host-login-scope='172.%.%.%'
|
|
bench --site <sitename> install-app erpnext
|
|
```
|
|
|
|
Replace `<sitename>` with your desired site name.
|
|
|
|
## Create site with app installation
|
|
|
|
You can install apps during site creation:
|
|
|
|
```bash
|
|
docker compose -p frappe exec backend bench new-site <sitename> \
|
|
--mariadb-user-host-login-scope='%' \
|
|
--db-root-password <db-password> \
|
|
--admin-password <admin-password> \
|
|
--install-app erpnext
|
|
```
|
|
|
|
> **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.
|
|
|
|
For more site operations, refer to [site operations](../../04-operations/01-site-operations.md).
|
|
|
|
> ## Understanding the MariaDB User Scope
|
|
>
|
|
> The flag --mariadb-user-host-login-scope='172.%.%.%' allows database connections from any IP address within the 172.0.0.0/8 range. This includes all containers and virtual machines running on your machine.
|
|
>
|
|
> **Why is this necessary?** Docker and Podman assign dynamic IP addresses to containers. If you set a fixed IP address instead, database connections will fail when the container restarts and receives a new IP. The wildcard pattern ensures connections always work, regardless of IP changes.
|
|
>
|
|
> **Security note:** This scope is sufficient because only the backend container accesses the database. If you need external database access, adjust the scope accordingly, but be cautious with overly permissive settings.
|
|
|
|
---
|
|
|
|
**Back:** [Build Setup →](02-build-setup.md)
|
|
|
|
**Next:** [Setup Examples →](../06-setup-examples.md)
|