mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
f6123cc261
* 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>
94 lines
2.9 KiB
YAML
94 lines
2.9 KiB
YAML
name: 'Setup Enviroment'
|
|
description: 'Setup the environment for general InvenTree tests'
|
|
author: 'InvenTree'
|
|
inputs:
|
|
python:
|
|
required: false
|
|
description: 'Install python.'
|
|
default: 'true'
|
|
npm:
|
|
required: false
|
|
description: 'Install npm.'
|
|
default: 'false'
|
|
|
|
install:
|
|
required: false
|
|
description: 'Install the InvenTree requirements?'
|
|
default: 'false'
|
|
dev-install:
|
|
required: false
|
|
description: 'Install the InvenTree development requirements?'
|
|
default: 'false'
|
|
update:
|
|
required: false
|
|
description: 'Should a full update cycle be run?'
|
|
default: 'false'
|
|
|
|
apt-dependency:
|
|
required: false
|
|
description: 'Extra APT package for install.'
|
|
pip-dependency:
|
|
required: false
|
|
description: 'Extra python package for install.'
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1
|
|
|
|
# Python installs
|
|
- name: Set up Python ${{ env.python_version }}
|
|
if: ${{ inputs.python == 'true' }}
|
|
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # pin@v4.7.1
|
|
with:
|
|
python-version: ${{ env.python_version }}
|
|
cache: pip
|
|
- name: Install Base Python Dependencies
|
|
if: ${{ inputs.python == 'true' }}
|
|
shell: bash
|
|
run: |
|
|
python3 -m pip install -U pip
|
|
pip3 install invoke wheel uv
|
|
- name: Set the VIRTUAL_ENV variable for uv to work
|
|
run: echo "VIRTUAL_ENV=${Python_ROOT_DIR}" >> $GITHUB_ENV
|
|
shell: bash
|
|
- name: Install Specific Python Dependencies
|
|
if: ${{ inputs.pip-dependency }}
|
|
shell: bash
|
|
run: uv pip install ${{ inputs.pip-dependency }}
|
|
|
|
# NPM installs
|
|
- name: Install node.js ${{ env.node_version }}
|
|
if: ${{ inputs.npm == 'true' }}
|
|
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # pin to v3.8.2
|
|
with:
|
|
node-version: ${{ env.node_version }}
|
|
cache: 'npm'
|
|
- name: Install npm packages
|
|
if: ${{ inputs.npm == 'true' }}
|
|
shell: bash
|
|
run: npm install
|
|
|
|
# OS installs
|
|
- name: Install OS Dependencies
|
|
if: ${{ inputs.apt-dependency }}
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install ${{ inputs.apt-dependency }}
|
|
|
|
# Invoke commands
|
|
- name: Install dev requirements
|
|
if: ${{ inputs.dev-install == 'true' ||inputs.install == 'true' }}
|
|
shell: bash
|
|
run: uv pip install -r requirements-dev.txt
|
|
- name: Run invoke install
|
|
if: ${{ inputs.install == 'true' }}
|
|
shell: bash
|
|
run: invoke install --uv
|
|
- name: Run invoke update
|
|
if: ${{ inputs.update == 'true' }}
|
|
shell: bash
|
|
run: invoke update --uv
|