mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 19:15:41 +00:00
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
This commit is contained in:
41
.devcontainer/docker-compose.yml
Normal file
41
.devcontainer/docker-compose.yml
Normal file
@ -0,0 +1,41 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:13
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- 5432/tcp
|
||||
volumes:
|
||||
- postgresql:/var/lib/postgresql/data:z
|
||||
environment:
|
||||
POSTGRES_DB: inventree
|
||||
POSTGRES_USER: inventree_user
|
||||
POSTGRES_PASSWORD: inventree_password
|
||||
|
||||
inventree:
|
||||
build:
|
||||
context: ..
|
||||
target: dev
|
||||
args:
|
||||
base_image: "mcr.microsoft.com/vscode/devcontainers/base:alpine-3.18"
|
||||
workspace: "${containerWorkspaceFolder}"
|
||||
data_dir: "dev"
|
||||
volumes:
|
||||
- ../:/home/inventree:z
|
||||
|
||||
environment:
|
||||
INVENTREE_DEBUG: True
|
||||
INVENTREE_DB_ENGINE: postgresql
|
||||
INVENTREE_DB_NAME: inventree
|
||||
INVENTREE_DB_HOST: db
|
||||
INVENTREE_DB_USER: inventree_user
|
||||
INVENTREE_DB_PASSWORD: inventree_password
|
||||
INVENTREE_PLUGINS_ENABLED: True
|
||||
INVENTREE_PY_ENV: /home/inventree/dev/venv
|
||||
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
volumes:
|
||||
postgresql:
|
Reference in New Issue
Block a user