Commit Graph

30 Commits

Author SHA1 Message Date
Oliver
064caafebb
API filter fix (#5979)
* Simplify custom date filter

* Add creation date data to test fixture

* Add 'creation_date' to part serializer

* Add unit test

* Update API version
2023-11-24 10:34:56 +11:00
Oliver
7ab5ddcd7d
Plugin auto migrate (#5668)
* Improved handling of race condition when saving setting value

* Improvements for managing pending migrations

- Inform user if there are outstanding migrations
- reload plugin registry (if necessary)

* Increase django-q polling time

According to this thread, should reduce multiple workers taking the same task:

https://github.com/Koed00/django-q/issues/183#issuecomment-239676084

* Revert default behavior

* Better logging

* Remove comment

* Update unit test

* Revert maintenance mode behaviour

* raise ValidationError in settings
2023-10-06 11:38:01 +11:00
Seth Price
60f344a360
Remove container-name:s from Compose file (#5339)
* Remove `container-name:`s from Compose file

* Remove `container-name:`s from dev Compose file

I forgot this one existed, oops.
2023-07-25 12:51:37 +10:00
Oliver
f4f39e274f
Add https comment to nginx file (#5243) 2023-07-14 08:53:37 +10:00
Oliver
8b730884d7
Handle exception when creating default labels (#5163)
* Handle exception when creating default labels

- Running workers in parallel may cause race conditions
- Catch any exception which is raised

* Prevent password from being logged

* Update default timeout for docker
2023-07-04 22:46:03 +10:00
Matthias Mair
aa2f5e330a
Make nginx more clear that changing the port is 'dangerous' (#4880)
* Make nginx more clear that changing the port is 'dangerous'
See https://github.com/inventree/InvenTree/issues/4859#issuecomment-1560025566

* also add note to prod docker-compose
2023-05-24 09:05:16 +10:00
Oliver
ee2290da28
Gunicorn options (#4192)
* Add option for controlling gunicorn timeout

* Adds gunicorn timeout as docker env variable
2023-01-10 07:53:57 +11:00
Oliver
4a3ca6d326
re-enable plugins by default for debug docker environment (#3894) 2022-11-02 09:51:36 +11:00
Matthias Mair
a3c9331a08
Add content headers to config (#3731)
* add content header

* add content header

* fix format

* fix format
2022-09-30 10:47:56 +10:00
Oliver
703731ec4d
Fix for docker-compose v1 (#3434)
v1 does not support the name attribute
2022-07-30 11:43:15 +10:00
Oliver
3fc9a36d4b
Simplification of development docker-compose file (#3429)
* Simplification of development docker-compose file

- Rename .env file
- Remove requirement for variable interpolation within the docker-compose file itself

* Add debug flag to CI test

* Additional quick-start docs (for docker)

* docker-compose update

- Introspection did not work quite as expected
- Set project name inside docker-compose file

* Fixes for "setup_test" task

- Check if directory exists before first deleting it
- Parameterize the "path" variable
- Add option to ignore update step

* Add demo data dir to .gitignore

* Remove debug call

* Update CONTRIBUTING.md
2022-07-30 10:34:16 +10:00
Oliver
ab654c3ae7
Disable redis image by default (#3416)
- Enable using the docker --profile command
2022-07-27 13:02:26 +10:00
Oliver
7cabb78964
Docker compose relative path (#3410)
* Update development docker-compose file

- Remove external volume definition
- v2 does not allow relative path spec here
- Simplification is only required for dev version

* Remove old debug messages

* Update docker build CI step

- Check that required directories / files have been created in the correct location(s)

* Add check for pgdb directory

* Run partial docker check on pull_request

* Disable workflow running on pull requests
2022-07-27 07:50:54 +10:00
Oliver
622c0636ef
Remove references to "plugins" volume in production docker-compose file (#3406) 2022-07-26 15:29:37 +10: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
Matthias Mair
cbae4474ab
Allow installation of local plugins via docker (#3348)
* Add option to mpunt plugins to docker

* [FR] Allow installation of local plugins via docker
Fixes #3343
2022-07-19 08:18:54 +10:00
Oliver
f23cef0400
docker: prevent ports being exposed outside container context (#3351) 2022-07-18 14:08:33 +10:00
Matthias Mair
7549d033df
Use env-variable for image tag (#3350) 2022-07-18 09:09:04 +10:00
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
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
93b6934127 fix trailing 2022-05-20 13:20:55 +02:00
Oliver
6d56dbd266 Adds project names for docker-compose files 2022-04-21 12:04:05 +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
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