Commit graph

37 commits

Author SHA1 Message Date
Lev
a9b6b755ce
Global refactoring (#617)
* Rename `bench-build` target to `bench` in bake file

* Update bake file and break everything

* Rename docker-compose.yml to compose.yml to avoid conflicting on `docker buildx bake`

* Fix groups in bake file

* Update frappe-worker

* Update frappe-nginx, erpnext-nginx

* Remove old erpnext images

* Update frappe-socketio

* Fix develop frappe-nginx build on linux/arm64

* Update dockerignore

* Update gitignore

* Update gitignore

* Update .env files

* Update installation (overrides)

* Update tests

* Fix image names

* Update compose

* Update get-latest-tags

* Update CI

* Setup and remove .env on tests

* Add build bench workflow

* Add triggers to main workflow

* Add release helm job

* Use reusable workflows

* Rollback

* Print configuration before running tests

* Show tests/.env

* Revert "Show tests/.env"

This reverts commit 4bc3bdebaf.

* Fix ci image versions

* Remove `frappe-` prefix in build directories

* Move requirements-dev.txt

* Fix image name in CI

* Update gitignore

* Update pre-commit config

* Drop `version:` in compose files

* Add push-backup

* Fix postgres CI test

* Change .yml to .yaml in compose file to follow compose-spec

* Remove prettierignore

* Fix dockerignore

* Change .yml to .yaml in compose file to follow compose-spec

* Don't depend on boto3 while testing (do it in backend)

* Update erpnext example version

* Don't fail ping on URLError

* Move assets volume to main compose file

* Fix type annotations for v12

* Fix postgres ci override in tests

* Fix spaces in socketio

* Reorder stages in nginx image, improve perfomance

* Remove unused todo

* Optimize worker build

* Install Node in worker image

* Add 502 error page

* Remove unused quiet-pull in tests

* Add configurator service to dynamically set common config

* Remove unused compose.ci-postgres.yml

* Use Python for configurator service: faster and more robust

* Add TODO.md

* Use python script to get latest tags in CI

* Clean up nginx dockerfile

* Remove VOLUME declaration

https://stackoverflow.com/a/55052682

* Add custom app example

* Remove pwd for now

* Remove pwd for now

* Use jq for parsing config in healthcheck

* Take advantage of yaml lang: add defaults in compose file. Also require env vars

* Fix CI

* Use resusable workflow

* Update

* Move release_helm job to main.yml

* Rename docker-build to docker-build-push

* Rename main to build_stable

* Rename bench targets

* Remove quotes from docker-build-push inputs

* Update build develop

* Remove HELM_DEPLOY_KEY secret from docker-build-push

* Add job names

* Remove build_bench workflow

* Update version input description in docker-build-push

* Print .env in tests, if version is develop, change to latest (for tag)

* Fix env setup

* Uncomment tests

* Parse and set short tags from git tag in bake file

* Move devcontainer settings to devcontainer.json

* Add db command notice

* Fix CI?

* Fix inconsistencies in development readme

* Remove pwd for now

* Remove custom apps for production instruction

* Update todos

* Add docs for images and compose files

* Add variables docs and allow custom frappe site name header

* Add notice about internal environment variables

* Update site-operations docs

* Update todos

* Add Overrides header in images-and-compose-files

* Update todos

* Remove extra docs

* Don't log requests in worker image (nginx already does that)

* Remove default value of FRAPPE_SITE_NAME_HEADER in example.env

* Use file that consistent in v12, v13 and develop to check /assets

* Fix paths in CI

* Update todos

* Remove TODO.md

* Update tests/_check_backup_files.py

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>

* Change variables MINIO_ACCESS_KEY and MINIO_SECRET_KEY to S3_ACCESS_KEY, S3_SECRET_KEY in tests

* Fix S3 test

* Use `nginxinc/nginx-unprivileged` instead of `nginx` image

Also use Ngnix 1.20 instead of unstable 1.21

* Fix https override

* Update Dockerfile

* Mount assets to backend service in read only mode

* Touch .build (#307), use scripts from nginx image to generate config and touch .build

* Update example env after building stable images

* Touch `.build` on develop image (untill https://github.com/frappe/frappe/issues/15396 is resolved)

* Add `make` to worker build deps for linux/arm64

* Fix update example.env job

* Fix .build creation on develop branch

* Move bench CI to different file

This way workflow runs only on PRs that relevant to bench build

* Fix app name in custom app example

* Update erpnext and frappe versions in example.env

* Don't install `svg-sprite` and `sass` node modules in nginx image on linux/arm64 (https://github.com/frappe/frappe/pull/15275)

* docs: README and docs

* docs: add link to site operations from docker swarm

* ci: fix tests as per changes to compose.yaml

* docs: move wiki articles to docs

* docs: fix add custom domain

* docs: fix patch code from images

* fix: do not expose port 80 for old images

* fix: custom domain labels to frontend container/service

* Add missing descriptions to envs in example.env

* Fix redis depends_on

* Fix docker compose in tests when not running on TTY

* Set -T flag in `docker compose exec` only if not tty

* Run pre-commit on docs

* Remove postgres healthcheck (it gets overriden by mariadb)

* Refactor test

* Update workflow names

* Add pip to dependabot config

* docs: backup and push (#19)

* Beautify changes by @revant (#20)

* feat: add gevent to worker image

* feat: real_ip configuration for nginx

* Return `healthcheck.sh` just for tests

Co-authored-by: Lev Vereshchagin <mail@vrslev.com>

* Make pretend bench catch unknown commands (closes #666)

* Remove debug print in push-backup

* Fix typing issues in push-backup

* Update file keys in push-backups: from abs path to <site>/<file>

* Refactor push-backup

* Move gevent installation in Frappe step

* Don't pin boto stubs requirement

* Cache pip deps on build

* Update example env versions

* Refactor check backup files

* Fix backup test

* Fix backup test

* Rename build/ dir to images/

* Rename build/ dir to images/

* Fix /build -> /images in docs

* Update example.env

* Use reusable workflow in frappe user instead of vrslev

* Fix compose`s `project` option in docs (https://github.com/frappe/frappe_docker/pull/617#issuecomment-1065178792)

* Add note about project option in site-operations doc

* Update example env

* Rename build arg `USERNAME` to `REGISTRY_USER`

* Allow https proxy to access Docker socket

* Revert "Use reusable workflow in frappe user instead of vrslev"

This reverts commit 6062500d0d.

* Revert "Revert "Use reusable workflow in frappe user instead of vrslev""

This reverts commit 4680d18ff8.

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2022-03-14 11:23:03 +05:30
Lev
05853825d8
build: Change bench target names and move CI to separate workflow (#655)
* Change bench target names and move CI to separate workflow

* Fix file detection
2022-02-08 11:35:52 +03:00
Lev
adaa753d89
fix: Bench initialization with ERPNext v12 on frappe/bench (#613) 2021-12-11 13:57:10 +05:30
Lev Vereshchagin
3e4e66769b chore(lint): Run end-of-file-fixer 2021-12-10 11:51:11 +03:00
Lev
6378473c43
fix(bench): Set BENCH_DEVELOPER env var in bashrc instead of Dockerfile (#598) 2021-12-05 16:45:50 +05:30
Lev
9b49391dbb
feat(bench): Don't show editable-bench warnings (#593) 2021-12-02 20:36:07 +05:30
Revant Nandgaonkar
0af1302485
fix: install py 3.7 using pyenv (#590)
* fix: install py 3.7 using pyenv

* fix: set pyenv global versions

* refactor: cleaup code
2021-11-30 16:03:01 +05:30
Lev
7c157aa487
refactor: Dockerfiles (#555)
* refactor(frappe-worker): Dockerfile

* fix(frappe-worker): Cloning frappe repo

* refactor(frappe-nginx): Dockerfile

* refactor(erpnext-nginx): Dockerfile

* chore(frappe-worker): Add space in Dockerfile

* refactor(bench): Dockerfile

* refactor(frappe-socketio): Dockerfile

* ci(Test): Add `workflow_dispatch` trigger

* fix(bench): Uncomment missing package

* fix(bench): Replace legacy `libmariadbclient-dev` with `libmariadb-dev`

* refactor(erpnext-nginx): Install script

- Remove repetitive code
- Don't explicitly install production deps (they are installed via plain `yarn` with dev deps)
- Don't write to lockfiles

* fix(erpnext-nginx): use -e flag, fix installation

* fix(erpnext-nginx): Don't install unused wget

* fix(frappe-nginx): Get newest certificates

* fix: Install ca-certificates on erpnext-nginx instead of frappe-nginx

* trigger ci

* ci(test): Fix trigger duplicate

* chore: Fix linting
2021-11-10 04:43:46 +05:30
Lev
d2b18a3b48 update 2021-11-05 18:58:02 +03:00
Peter Dave Hello
08442253c8
Set git clone depth to 1 in build/bench/Dockerfile
Looks like it's done in the other Dockerfiles
2021-08-09 16:13:05 +08:00
Revant Nandgaonkar
c6da8a1d98 feat: improve and upgrade build
use nodejs v14
allow build args to pass repo and branch
2021-05-21 14:30:55 +05:30
Revant Nandgaonkar
c90783d6be feat: make images arm64 compatible 2021-01-08 17:45:22 +05:30
Revant Nandgaonkar
77b9eda567
Revert "feat: make images arm64 compatible" 2021-01-07 19:44:40 +05:30
Revant Nandgaonkar
8d2c139fc6 ci: use docker buildx in travis 2021-01-07 19:37:46 +05:30
Revant Nandgaonkar
4f904fe3b9 feat: make images arm64 compatible 2021-01-05 14:47:01 +05:30
Revant Nandgaonkar
062eea917a update: nodejs lts to latest minor and patch version 2021-01-04 18:54:11 +05:30
Revant Nandgaonkar
e097f54481 fix: bench image
use specific version(s) of nodejs
[skip travis]
2020-07-01 04:24:49 +05:30
Revant Nandgaonkar
f871834dbe feat: dev environment also starts postgresql 2020-06-30 15:25:10 +05:30
Revant Nandgaonkar
90556e75bc
Merge pull request #276 from africlouds/develop
Install less in bench Dockerfile
2020-06-19 20:09:00 +05:30
africlouds
d17ea1366a
Install less in bench Dockerfile
Without less install, tools like bench --site site_name mariadb are not displaying results
2020-06-19 07:44:02 +02:00
Revant Nandgaonkar
daef926b06 feat(frappe/bench): allow 5 benches 2020-06-11 12:55:27 +05:30
Revant Nandgaonkar
b057e12bdc update: use wkhtmltopdf for buster_amd64 2020-05-19 12:10:09 +05:30
Revant Nandgaonkar
20f1fa0000 chore: update frappe/bench image
use latest nodejs v10 and v12
use cloned bench for bench development
2020-05-18 00:18:08 +05:30
Davide Bortolami
2e0a863ef7 Update documentation, add ssh-client to bench build, expose MariaDB port in development 2020-04-17 00:34:22 +01:00
Revant Nandgaonkar
56124984d7 fix(bench): debugger fail after bench update
fix debugger fail after bench update
error locale.Error: unsupported locale setting
add locale to image
2020-03-12 05:53:47 +05:30
Revant Nandgaonkar
f506c25a6e feat(bench): bash-completion
add bash-completion package
remove install_packages duplicates
workdir set to /home/frappe
2020-03-11 22:38:48 +05:30
Davide Bortolami
ba239c0ebe Install yarn in both nodes 2020-03-10 00:08:50 +00:00
Davide Bortolami
31f770d467 UID GID 1000 2020-03-10 00:00:46 +00:00
Davide Bortolami
07a43e5386 removed not needed volume 2020-03-09 13:26:42 +00:00
Davide Bortolami
8611c2dc05 reduce layers, cleanup comments 2020-03-08 23:37:30 +00:00
Davide Bortolami
0746693c1f some other useful software 2020-03-08 19:07:03 +00:00
Davide Bortolami
ae5979ee8f Fixed node and python installation, local user 2020-03-08 18:37:26 +00:00
Davide Bortolami
333786d013 small cleanup 2020-03-07 18:43:58 +00:00
Davide Bortolami
b437dcd284 Update development Dockerfile to better resemble production dockerfiles. Still untested. 2020-03-07 18:24:54 +00:00
Davide Bortolami
94e62d0268 fix #119 2020-03-07 00:38:10 +00:00
Revant Nandgaonkar
be3d90dd03 fix: bench image
install nvm in user home
allows npm install -g
install yarn in v10
2020-03-05 23:49:48 +05:30
Revant Nandgaonkar
d071bf232d feat: development docker 2020-03-05 21:56:31 +05:30