Commit Graph

30 Commits

Author SHA1 Message Date
Oliver
c65f7dce14
Dockerfile fixes (#6905)
- Change "as" to "AS"
2024-04-02 12:14:04 +11:00
Oliver
c82713328d
Worker thread fix (#6733)
* Do not enforce INVENTREE_LOG_LEVEL in dockerfile

- Already defaults to WARNING anyway
- Prevents override in config file

* Enable plugin loading in worker thread
2024-03-18 09:22:06 +11:00
Oliver
cbc879f618
[Docker] Fix broken image (#6621)
* Install grpcio faster

- Pin version
- Update build packages

* Test dockerfile before push

- SImply test if invoke is present

* Revert commit to docker-compose

* Remove VIRTUAL_ENV from Dockerfile

* Fix pip install

* Run extra checks on docker image

* Ensure mariadb links are installed:

- Closes https://github.com/inventree/InvenTree/issues/6625

* Adjust CI

 build docker image manually

* Should fail

- Test that revert fails CI

* Ok, this should break it

* Fix Dockerfile
2024-03-04 22:50:00 +11:00
Oliver
2e81a304d1
Devcontainer postgresql (#6590)
* Working on devcontainer with postgresql

* Fix for docker-compose.yml

* Update postCreateCommand

* Tweak docker compose file

* Fix Dockerfile

- Do not use uv (breaks process)

* Update postCreateCommand.sh

- Skip database backup

* Tweak file

* Further improvements

- Remove 'devcontainer' Dockerfile target
- Fix postCreateCommand

* Further cleanup

* Reduce SQL errors

- Use filter().exists() rather than get()

* Set default SITE_URL

* Docs updates

* Fix hard-coded django version

* Update faq.md

* Typo fix: PluginObject -> PluginConfig

* Docs: strict mode

* docs: fix link

* docs: fix typo

* Fix error message

* Revert change to config_template default
2024-02-28 15:04:14 +11:00
Oliver
f6123cc261
[WIP] docker / Caddy (#6551)
* remove docker-sqlite file

- Do not want to encourage use of sqlite

* Add Caddyfile

* Add default site URL to .env

- Matches Caddyfile

* Cleanup / simplify .env file

* Remove dev nginx conf file

* Further cleanup of .env file

* Update docker-compose.yml

- Use caddy image instead of nginx as proxy

* Set max body size

* gunicorn: enable external logging

* Update file structure

* Cleanup docker-compose file

* Update docker/docker-compose.yml

Co-authored-by: Matthias Mair <code@mjmair.com>

* Update docker/Caddyfile

Co-authored-by: Matthias Mair <code@mjmair.com>

* Fix for postgresql packages

- Need postgresql13-client to be installed, it contains pg_dump
- Without this, backup / restore *does not work*

* Create static_i18n dir if it does not exist

* Reduce output from collectstatic

* Revert gunicorn logging

- Want to see the logs in docker

* Fix trailing slash

Ref: https://github.com/inventree/InvenTree/pull/6551#issuecomment-1962423765

* tasks.py - pass 'nouv' option through

* Update package requirements:

- Allow installation of rapidfuzz without building

* Install uv as part of docker image

* Add environment variable to control downstream URL

* Do not use uv package manager by default

- Currently does not work "correctly" - ignores installed packages
- Requires further work to run reliably

* Fix docker-compose file

- Do not build locally

* Cleanup gunicorn file

- Remove unused lien

* Cleanup docker-compose.yml

- Simpler volume management

* Update Caddyfile

Add newline

* Update requirements.txt

Add newline

* Update tasks.py

Add missing blank line

* Simplify Caddyfile

* Adds option for customizing web port

* cleanup docker-compose.yml

- Better mapping of caddy data
- Cleaner volume setup

* Add django version template

- Ensure all docs links point to the current django version we are using

* docs: cleanup intro.md

* Cleanup serving_files.md

* Cleanup config.md

* docker install docs updates

* Enable code block copying

* Fix include file

* Fix link

* Update docker install docs

* Update docker.md

* Add info about demo dataset

* Tweak heading

* Update docs link checks

* Fix workflow

* Another fix

* More ignore pattearns

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2024-02-28 01:06:19 +11:00
Matthias Mair
ea63a03fe4
Refactor docker CI for speed increases (#6562)
* push to ghcr (#168)

* Update docker.yaml

* Update docker.yaml

* Update docker.yaml

* use matrix to build for the plattforms (faster amd pub)

* try Buildjet

* switch to pyhton 3.9

* Update docker.yaml

* path python manually?

* bump python to 3.11

* Update Dockerfile

* step down vm

* cleanup workflow

* install docker on mac

* and docker compose too

* switch back to linux

* Docker tests (#175)

* push to ghcr (#168)

* Update docker.yaml

* Update docker.yaml

* Update docker.yaml

* use matrix to build for the plattforms (faster amd pub)

* try Buildjet

* switch to pyhton 3.9

* Update docker.yaml

* path python manually?

* bump python to 3.11

* Update Dockerfile

* step down vm

* cleanup workflow

* install docker on mac

* and docker compose too

* switch back to linux

* switch to uv

* fix uv install

* reintroduce checks

* cleanup diff
2024-02-27 09:50:44 +11:00
Oliver
22af3e2f59
Postgresql fix (#6441)
* Assume maintenance mode is *on* if database is inaccessible

* Specify ash shell

* Update psycopg requirements

* Style fixes

* style fix - backends.py
2024-02-07 22:33:37 +11:00
Oliver
f88d5577d1
[Docker] Pin postgresql version (#6407)
* Update docker build

- Pin postgresql libs to v13

* Fix typo
2024-02-05 18:25:14 +11:00
Oliver
e1e63fa644
Fix for tasks.py - docker (#6380)
* Instrument tasks.py

* Enforce no_frontend

* Run docker CI step if tasks.py changes
2024-02-01 12:25:24 +11:00
Philipp Fruck
9ecaea2c12
chore(docker): Remove intermediate stage (#6068)
removes the prebuild stage from the final image
which solves the issue that build dependencies
where not cleaned up properly. Saves a couple
of MB in image size.
2023-12-11 09:57:37 +11:00
Oliver
f96055a33f
Refactor docker image for devcontainer (#6029)
* Make base image configurable

* Refactor dockerfile

- Place extra packages into extra shell script
- Add pre-build stage where packages are installed, and then cache removed
- Run same script in dev target, but do not remove

* Run docker workflow whenever package requirements change

* Replace devcontainer dockerfile

* Install base packages in devcontainer

* --no-cache-dir
2023-12-05 07:05:48 +11:00
Oliver
ff4138e8de
Revert "bumped docker base image (#5889)" (#5905)
This reverts commit 41296e4574.
2023-11-13 12:58:32 +11:00
Matthias Mair
41296e4574
bumped docker base image (#5889) 2023-11-13 12:44:31 +11:00
Lukas
8ec04028d5
Native LDAP support (#5226)
* Added basic ldap support

* Added new settings to config template

* Added missing apk dependency to dockerfile

* update requirements.txt

* Remove requirements and added docs

* Update advanced.md

* Added more ldap options

* allow direct bind
* add ldap debug mode
* add ldap global_options
* add start_tls
* use get_boolean_setting

* Update advanced.md to use a warning box

* fix: style

* Update advanced.md

* Remove ldap install instructions for non docker installs
2023-10-05 07:52:36 +11:00
Oliver
2243f288ee
Increase yarn timeout in dockerfile (#5505)
Closes https://github.com/inventree/InvenTree/issues/5494
2023-09-05 13:10:00 +10:00
Oliver
1125bf4396
Mantine (#5274)
* Add .gitignore for compiles web assets

* Update react dependencies

- Add mantine/core
- Add mantine-datatable

* Add more packages

- mantine/dropzone
- mantine/notifications

* Fix for development docker image
2023-07-19 06:28:00 +10:00
Matthias Mair
3e37469350
Platform UI - React integration (#5011)
* Add SPA views for react #2789

* split up frontend urls

* Add settings for frontend url loading

* add new UI scaffold

* remove tracking insert

* add platform app

* ensure static indexes work too

* add lingui

* add lingui config

* add mgmt tasks

* add base locales

* settings for frontend dev

* fix typo

* update deps

* add pre-commit

* add eslint

* add testing scaffold

* fix paths

* remove error - tests trip correctly

* merge workflow

* cleanup samples

* use name inline with other tests

* Add real worl frontend tests

* setup env

* tun migrations first

* optimize setup time

* setup demo dataset

* optimize run setup

* add test for class ui

* rename

* fix typo

* and another typo

* do install

* run migrations first

* fix name

* cleanup

* use other credentials

* use other credentials

* fix qc

* move envs to qc

* remove create_site

* reduce testing env

* fix test

* fix test call

* allaccess user

* add ui plattform check

* add better check

* remove unneeded env

* enable debug

* reduce wait time

* also build frontend on static

* add sort plugin

* fix order

* run pre-commit fixes

* add node min version

* Docker container (#129)

* Fix allocation check for completing build order (#5199)

- Allocation check only applies to untracked line items

* docker dev

Install required node packages to docker development image

* add import order settings

* cleanout built ui

* remove default arg from build

* remove eslint

* optimize svg

* add build step for plattform UI

* fix install command

* use alpine commands

* do not use cache when creating image

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2023-07-18 22:45:49 +10:00
Oliver
92b0a19270
Docker: add missing reporting libs (#5213)
* Docker: add missing reporting libs

* Fix pango / cairo libs

Ref: https://github.com/Kozea/WeasyPrint/issues/699

* Move to where it will actually do something

* Remove continuation

* Remove dev packages
2023-07-10 21:12:17 +10:00
Lukas
4a1f73331f
Refactor: Dockerimage (#5007)
* refactor docker image to reduce size

* Added required deps for database drivers

* Added alpine test dockerfile

* Readded image libs to Dockerfile

* Fix link in dockerfile

* Replaced Dockerfile

* Remove bash from image

* Added base target to Dockerfile

* Added missing mysql dev headers

* Add dev target back to Dockerfile

* fix: Dockerfile style

* Add old comments back to dockerfile

* Removed wrong comment

* Added back piwheels repo
2023-07-10 19:52:33 +10:00
Oliver
9a61f7c69d
Docker: Add pinwheels.org repo for armv7 architecture (#4598)
* Docker: Add pinwheels.org repo for armv7 architecture

* Updated comment in dockerfile
2023-04-11 15:23:36 +10:00
Oliver
5ad4152270
Update dockerfile requirements (#4578) 2023-04-04 23:17:31 +10:00
Oliver
eef303dfea
Cryptography version update (#4568)
* Update required cryptography library version

* remove old env variable from dockerfile

- Was required when we based on alpine linux
- now we use python_slim

* Fix file contents
2023-04-04 07:04:10 +10:00
simonkuehling
75c82f4db4
add libwebp-dev dependency (fixes #4269) (#4335) 2023-02-12 07:10:48 +11:00
Oliver
9c4faad68e
Add postgresql-client to docker image (#3802) 2022-10-17 14:50:05 +11:00
Matthias Mair
182bc29053
Add db an media backups (#3783)
* [FR] Add backup into inventrees lifecycle
Fixes #3778

* Add env to testing enviros

* block backup from running app commands

* Add more commands

* fix postgres version

* Update used env

* add daily task to run backups

* add installer changes
2022-10-17 00:09:31 +11:00
Oliver
5bb76a3730
Docker compose plugins fix (#3357)
* Simplify dockerfile - remove INVENTREE_DEV_DIR

- We can simply use INVENTREE_DATA_DIR
- Will need to update the documentation

* Remove plugin dir support from production docker-compose file
2022-07-20 09:05:05 +10:00
Oliver
830ecd5677
Update package requirements for docker (#3285)
* Include cargo / rustc in the docker image

- Otherwise cryptography library seems to fail

* Revert cryptography lib to older version

- New version requires rust, adds ~300MB to the image size!
2022-07-03 21:44:40 +10:00
Oliver
71ed181611
Change docker user (#3096)
- Running under 'inventree' user means that the mounted volume cannot be accessed
- Will need to return to this issue soon
2022-05-30 08:37:58 +10:00
Oliver
1f6b81745d
Docker: Require libffi-dev (#3092) 2022-05-29 11:07:09 +10:00
Oliver
b9fd263899
Docker improvements (#3042)
* Simplified dockerfile

- Changed from alpine to python:slim
- Removed some database libs (because we *connect* to a db, not host it)

* - Add gettext as required package
- Only create inventree user as part of production build (leave admin access for dev build)

* Tweaks for tasks.py

* Fix user permissions (drop to inventree user)

* Drop to the 'inventree' user level as part of init.sh

- As we have mounted volumes at 'run time' we need to ensure that the inventree user has correct permissions!
- Ref: https://stackoverflow.com/questions/39397548/how-to-give-non-root-user-in-docker-container-access-to-a-volume-mounted-on-the

* Adjust user setup

- Only drop to non-root user as part of "production" build
- Mounted external volumes make it tricky when in the dev build
- Might want to revisit this later on

* More dockerfile changes

- reduce required system packages
-

* Add new docker github workflow

* Print some more debug

* GITHUB_BASE_REF

* Add gnupg to base requirements

* Improve debug output during testing

* Refactoring updates for label printing API

- Update weasyprint version to 55.0
- Generate labels as pdf files
- Provide filename to label printing plugin
- Additional unit testing
- Improve extraction of some hidden debug data during TESTING
- Fix a spelling mistake (notifaction -> notification)

* Working on github action

* More testing

* Add requirement for pdf2image

* Fix label printing plugin and update unit testing

* Add required packages for CI

* Move docker files to the top level directory

- This allows us to build the production image directly from soure
- Don't need to re-download the source code from github
- Note: The docker install guide will need to be updated!

* Fix for docker ci file

* Print GIT SHA

* Bake git information into the production image

* Add some exta docstrings to dockerfile

* Simplify version check script

* Extract git commit info

* Extract docker tag from check_version.py

* Newline

* More work on the docker workflow

* Dockerfile fixes

- Directory / path issues

* Dockerfile fixes

- Directory / path issues

* Ignore certain steps on a pull request

* Add poppler-utils to CI

* Consolidate version check into existing CI file

* Don't run docker workflow on pull request

* Pass docker image tag through to the build

Also check .j2k files

* Add supervisord.conf example file back in

* Remove --no-cache-dir option from pip install
2022-05-29 09:40:37 +10:00