Skip to content

Sviluppo locale (macOS / Docker) ​

Scopo ​

Avviare Ez FactoryOS in development con Docker Compose e Makefile, senza installare Bench sull’host.

Prerequisiti ​

  • Docker Desktop (o engine equivalente)
  • Git, Make
  • Porte libere tipiche: 8001 (HTTP), 9001 (SocketIO), 3307 (MariaDB), 6380 (Redis)

Procedura ​

bash
cp .env.example .env
# Impostare ADMIN_PASSWORD, DB_* (non committare .env)
make setup
make up

Stack: deploy/compose/development.yml — servizi mariadb, redis, frappe monolitico (bench start). App montata da apps/ez_factoryos.

Accesso ​

VoceValore
URLhttp://localhost:8001
Sitefactory.local
UserAdministrator
PasswordADMIN_PASSWORD in .env

Aggiungere factory.local in /etc/hosts se necessario (127.0.0.1 factory.local).

Comandi Makefile ​

ComandoDescrizione
make setupCrea .env e verifica Docker
make up / make downAvvia / ferma stack
make logsLog Frappe
make shellShell nel container
make testLint + bench run-tests
make migratebench migrate
make backup / make restoreBackup/restore locali
make resetSolo con CONFIRM_RESET=yes EZ_ENV=development
make compose-validateValidazione compose

Bench nel container ​

bash
./scripts/bench-exec.sh bench --site factory.local console
./scripts/bench-exec.sh bench --site factory.local run-tests --app ez_factoryos

Node-RED locale (opzionale) ​

Vedi deploy/node-red/README.md. Impostare NODE_RED_BASE_URL e token in .env.

Verifica ​

bash
curl -fsS http://localhost:8001/api/method/ping
# atteso: {"message":"pong"}
make test

Login Desk /desk e app Ez FactoryOS.

Rollback / Troubleshooting ​

ProblemaAzione
Site does not existHosts factory.local; make down && make up
Porta occupataCambiare HTTP_PUBLISH_PORT / DB_PUBLISH_PORT in .env
Reset completoCONFIRM_RESET=yes EZ_ENV=development make reset (distrugge volumi locali)
Migrazionimake migrate dopo pull DocType

Alias setup breve: setup/local-development.

Ez FactoryOS — MES per Ortobellina / OP Raggio di Sole · App Frappe v16 ez_factoryos