Sign inSign up

neocodeit/frappe-docker-deploy

By neocodeit

•Updated about 2 months ago

Basic Auto-update/ deployment Docker container for custom Frappe docker builds.

Image
Integration & delivery
Developer tools
1

634

neocodeit/frappe-docker-deploy repository overview

⁠Frappe docker auto deploy

Basic Auto-update/ deployment Docker container for custom Frappe docker builds. Will update, build and replace your current Containers or spin up new Project if not existing. It won't create a default bench site or any kind of backup.

⁠Which steps will this container do?

  1. Pull latest app versions and Frappe
  2. Generate new custom docker image based on the apps specified in /config/apps.json and additional docker build commands specified in /config/Dockerfile.extra
  3. Generate docker compose file, which includes all required services except the proxy (Frontend will be available on port HTTP_PUBLISH_PORT or 8080)
  4. Stop the current project (specified using ENV-variables)
  5. Launch/Recreate project based on the new image
  6. Run bench migrate & clear cache

⁠Requirements

  • Docker Engine v23 or newer on the host. The image build passes apps.json as a BuildKit secret, which requires BuildKit on the host's Docker daemon (default since Engine v23)

⁠How to use

Spin up docker container

docker run -d \
-v /var/run/docker.sock:/var/run/docker.sock \
-v frappe_updater_config:/home/updater/config \
-e DB_PASSWORD="admin" \
-e PROJECT_NAME="frappe" \
--name frappe-updater \
neocodeit/frappe-docker-deploy:latest

Optional Parameter:

-e APP_NAME App name which will be used to create unique mount and network names. Defaults to PROJECT_NAME
-e TZ Change default timezone for the scheduler. Defaults to UTC
-e SCHEDULED_TIME Scheduled time (for updates). Read more about the scheduler below. Defaults to instant run without scheduler beeing set.
-e HTTP_PUBLISH_PORT Change http Port of frappe. Defaults to 8080
-e FRAPPE_BRANCH Frappe branch which will be used for the bench init. Defaults to the upstream default branch of frappe_docker

⁠Scheduler config

You can set SCHEDULED_TIME to any valid timestring accepted by bash date command. Possible options are: 03:00, next monday. This rule will be applied after every scheduler run. If no timestring is set, this container will run instantly and exit

⁠Default Frappe config

The docker compose-file will be based on this frappe config:

// Please note: In order to enable SSL access, a reverse proxy will be required as it is disabled by default
docker compose -f compose.yaml \
  -f overrides/compose.mariadb.yaml \
  -f overrides/compose.redis.yaml \
  -f overrides/compose.noproxy.yaml \
  config > ./docker-compose.yaml

⁠Performance & Downtime

Expected downtime (during redeployment of the container): ~2min

Expected build time (running without downtime): 20min

Due to the fact that cached rebuild can't be used, the build time will take a bit longer at ~20 minutes.

Tag summary

Content type

Image

Digest

sha256:aab63d6b6…

Size

57.2 MB

Last updated

about 2 months ago

docker pull neocodeit/frappe-docker-deploy