Commit Graph

158 Commits

Author SHA1 Message Date
Oliver
63f1e58ca9
Fix container priority for docker compose recipe (#3180)
- Cache must be running *before* the server
- Server must be running *before* the worker
2022-06-11 19:58:36 +10:00
Oliver
d9efe27f8a
Adds redis support to production docker-compose (#3171)
* Adds a redis container to the production docker-compose script

* Fix ports
2022-06-10 20:16:19 +10:00
Matthias Mair
f38386b13c
Add more checks to pre-commit (#3132)
* Add bandit to pre-commit checks

* fix catchall exceptions

* remove unused definitons

* remove unuseed ariables

* Add docstring

* fix B006, B008 errors

* fix B007 error

* ignore B009

* Add checks for formatting and naming
2022-06-06 08:56:52 +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
Matthias Mair
e1d22f538d resort imports 2022-05-20 17:24:51 +02:00
Matthias Mair
93b6934127 fix trailing 2022-05-20 13:20:55 +02:00
Oliver Walters
7e6d3d81b9 Update dockerfile to 3.14 2022-05-16 21:47:09 +10:00
Oliver Walters
495798dc98 Install libwebp-dev as part of dockerfile 2022-05-15 23:20:12 +10:00
Oliver Walters
bb5d6815df Mark inventree home directory as safe for git.
Ref: https://github.blog/2022-04-12-git-security-vulnerability-announced/
2022-05-10 23:24:32 +10:00
Oliver
86f562f3b8 Add gdk-pixbuf
- Required for weasyprint (reports) to render jpg files
2022-04-27 13:46:50 +10:00
Oliver Walters
0cd5a2b005 Revert location of init.sh for Dockerfile 2022-04-21 20:17:12 +10:00
Oliver
6d56dbd266 Adds project names for docker-compose files 2022-04-21 12:04:05 +10:00
Oliver Walters
67196b866e Compose script fixes
- Define INVENTREE_DB_NAME
- Cache built image
2022-04-21 01:13:34 +10:00
Oliver Walters
a376625088 Force INVENTREE_DB_USER and INVENTREE_DB_PASSWORD to be set manually
- Only for the "production" docker setup
2022-04-21 01:04:46 +10:00
Oliver Walters
ced9c6c050 Sqlite docker-compose file no longer requires .env file
As this is only used for CI this is OK
2022-04-21 01:02:55 +10:00
Oliver Walters
0974fde59e Add sqlite-config file back in
- required for CI steps
- might refactor this out later on
2022-04-21 00:34:24 +10:00
Oliver Walters
e15a4b73cd Restore docker-compose.sqlite.yml
This is used for docker build testing in CI!
2022-04-21 00:03:48 +10:00
Oliver Walters
0c93009bf7 Tweaks to dockerfile 2022-04-21 00:01:11 +10:00
Oliver Walters
6929d07f42 Cache the pre-built image
- The worker container can then use it
- Saves a *lot* of time (and otherwise wasted resources)
2022-04-20 23:52:56 +10:00
Oliver Walters
e87e478009 Fix env file reference for docker-compose.yml (development) 2022-04-20 23:34:50 +10:00
Oliver Walters
85feb30812 Refactor development docker-compose setup 2022-04-20 23:15:37 +10:00
Oliver Walters
0b3aac21ea The production docker-compose file now no longer needs to be touched at all
Everything can be specified in the .env file!
2022-04-20 22:46:25 +10:00
Oliver Walters
c3fff02bd8 Automatically create a database (with the correct name) when the db container is started! 2022-04-20 22:11:07 +10:00
Oliver Walters
a50f26e84d Adjust naming of nginx production file 2022-04-20 21:52:25 +10:00
Oliver Walters
e4e735a71b Refactoring docker-compose.postgresql.yml
- Do not require duplication of username / password values
- Specify different env file
- Move to a new child directory which simplifies setup
2022-04-20 21:44:22 +10:00
Oliver Walters
f0a01587ac Rename default docker-compose file 2022-04-20 21:18:12 +10:00
Oliver Walters
85c8b94d80 Update nginx conf files 2022-04-19 22:09:30 +10:00
husas
f76cc89d5a Updated setuptools version 2022-03-28 17:27:22 +05:30
Oliver Walters
fcfdec0ad6 Fix requirements.txt formatting 2022-03-25 21:47:38 +11:00
Oliver Walters
03eb5441c7 Pin setuptools version
- Recent update seems to have borked it
2022-03-25 21:43:10 +11:00
Oliver Walters
f9ffbe322a Adds note 2022-01-19 12:32:30 +11:00
Oliver Walters
fcb958c5c0 Adds an option to enable nginx proxy for "dev mode" in docker
- Commented out by default
- No functional change unless code is un-commented in the docker-compose script
2022-01-19 12:31:35 +11:00
Oliver
934de1f772 Adds the ability for 'scheduled tasks' to be member functions of plugins 2022-01-13 10:24:47 +11:00
Oliver
31df4eae83 Set default environment variables for docker setups 2022-01-11 12:35:32 +11:00
Oliver
836b6275b6 Removes custom plugins directory
- rely on plugins.txt instead
2022-01-06 13:31:04 +11:00
Oliver
75d5f9d6e6 Allow specification of an external plugin directory
- Specify directory using INVENTREE_PLUGIN_DIR
- Specify installation file using INVENTREE_PLUGIN_FILE
2022-01-06 12:39:01 +11:00
Oliver
690ba811ef require gnupg in docker image 2021-12-30 22:58:52 +11:00
Oliver
15c95e9dd0 re-add gunicorn to core docker requirements
(oops, broke the demo server)
2021-12-22 11:23:57 +11:00
Oliver
ecb9643cc1 Use sqlite config for docker build test 2021-12-21 16:14:04 +11:00
Oliver
11d3cd3c0c Change dev environment setup to use postgresql
- sqlite causes too many errors
- fix requirements file
- fixes for docker setup
- A lot of concurrency issues
- Bite the bullet, time to go!
2021-12-21 00:34:23 +11:00
Oliver
5307f0f51b Collect translation stats as part of docker container initialization 2021-11-26 20:43:01 +11:00
Oliver
b17d6f932a
Merge pull request #2165 from nwns/feature/redisascache
Add support for using Redis as a cache and a broker
2021-11-11 17:08:41 +11:00
Oliver
ab3acc4601 Target production docker-compose script to inventree:stable 2021-11-05 07:52:15 +11:00
Nigel
e8c2d4da10
Add support for using redis as a cache and a broker 2021-11-02 16:37:28 -06:00
Oliver Walters
1832a6f1fa Run APK upgrade
Ref:
2021-10-13 00:53:41 +11:00
Oliver Walters
c3e0c9378f Upgrade pip as part of dockerfile 2021-10-13 00:52:48 +11:00
Oliver Walters
ac242c01c1 Updates for building cryptography lib 2021-10-13 00:46:46 +11:00
Matthias
c872412d04
rust for SSO needed 2021-10-07 00:26:37 +02:00
Oliver
47524f6ea3 Fix for docker development env file 2021-08-23 08:39:09 +10:00
Antonin Kral
7f126e58d2
Fix for production docker environment
Values are passed as written resulting in `"WARNING"` being passed to python logger, which will complain and panic. Fix is simply to remove `"` from the value.
2021-08-22 20:59:51 +02:00