diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 43498259..b0a1e6d6 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -23,9 +23,10 @@ services: command: sleep infinity volumes: - ..:/workspace:cached + working_dir: /workspace/development ports: - - "8000:8000" - - "9000:9000" + - "8000-8005:8000-8005" + - "9000-9005:9000-9005" volumes: mariadb-vol: diff --git a/build/bench/Dockerfile b/build/bench/Dockerfile index 5b2a67eb..03ad4bad 100644 --- a/build/bench/Dockerfile +++ b/build/bench/Dockerfile @@ -113,4 +113,4 @@ RUN bash -c "node --version" \ && bash -c "npm --version" \ && bash -c "yarn --version" -EXPOSE 8000 9000 6787 +EXPOSE 8000-8005 9000-9005 6787 diff --git a/build/common/worker/docker-entrypoint.sh b/build/common/worker/docker-entrypoint.sh index d07e3cb6..d6194c17 100755 --- a/build/common/worker/docker-entrypoint.sh +++ b/build/common/worker/docker-entrypoint.sh @@ -125,7 +125,8 @@ elif [ "$1" = 'schedule' ]; then fi elif [ "$1" = 'new' ]; then - + checkConfigExists + checkConnection if [[ -z "$RUN_AS_ROOT" ]]; then su frappe -c ". /home/frappe/frappe-bench/env/bin/activate \ && python /home/frappe/frappe-bench/commands/new.py" diff --git a/development/README.md b/development/README.md index 77152d90..030bfe35 100644 --- a/development/README.md +++ b/development/README.md @@ -11,7 +11,7 @@ In order to start developing you need to satisfy the following prerequisites: It is recommended you allocate at least 4GB of RAM to docker: - [Instructions for Windows](https://docs.docker.com/docker-for-windows/#resources) -- [Instructions for MacOOS](https://docs.docker.com/docker-for-mac/#resources) +- [Instructions for macOS](https://docs.docker.com/docker-for-mac/#resources) ## Bootstrap Containers for development @@ -30,8 +30,8 @@ VSCode should automatically inquire you to install the required extensions, that - Install Remote - Containers for VSCode - through command line `code --install-extension ms-vscode-remote.remote-containers` - - clicking on the button at the following link: [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) - - searching for extension `ms-vscode-remote.remote-containers` + - clicking on the Install button in the Vistual Studio Marketplace: [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) + - View: Extensions command in VSCode (Windows: Ctrl+Shift+X; macOS: Cmd+Shift+X) then search for extension `ms-vscode-remote.remote-containers` After the extensions are installed, you can: @@ -244,6 +244,7 @@ EXIT; In case you don't use VSCode, you may start the containers manually with the following command: +### Running the containers ```shell docker-compose -f .devcontainer/docker-compose.yml up -d ```