mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-13 18:45:40 +00:00
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!
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
version: "3.8"
|
||||
|
||||
# Docker compose recipe for InvenTree development server
|
||||
# - Runs sqlite3 as the database backend
|
||||
# - Runs PostgreSQL as the database backend
|
||||
# - Uses built-in django webserver
|
||||
# - Runs the InvenTree background worker process
|
||||
# - Serves media and static content directly from Django webserver
|
||||
|
||||
# IMPORANT NOTE:
|
||||
# The InvenTree docker image does not clone source code from git.
|
||||
@ -11,10 +13,32 @@ version: "3.8"
|
||||
# The django server will auto-detect any code changes and reload the server.
|
||||
|
||||
services:
|
||||
|
||||
# Database service
|
||||
# Use PostgreSQL as the database backend
|
||||
# Note: This can be changed to a different backend if required
|
||||
inventree-dev-db:
|
||||
container_name: inventree-dev-db
|
||||
image: postgres:13
|
||||
ports:
|
||||
- 5432/tcp
|
||||
environment:
|
||||
- PGDATA=/var/lib/postgresql/data/dev/pgdb
|
||||
# The pguser and pgpassword values must be the same in the other containers
|
||||
# Ensure that these are correctly configured in your dev-config.env file
|
||||
- POSTGRES_USER=pguser
|
||||
- POSTGRES_PASSWORD=pgpassword
|
||||
volumes:
|
||||
# Map 'data' volume such that postgres database is stored externally
|
||||
- src:/var/lib/postgresql/data
|
||||
restart: unless-stopped
|
||||
|
||||
# InvenTree web server services
|
||||
# Uses gunicorn as the web server
|
||||
inventree-dev-server:
|
||||
container_name: inventree-dev-server
|
||||
depends_on:
|
||||
- inventree-dev-db
|
||||
build:
|
||||
context: .
|
||||
target: dev
|
||||
|
Reference in New Issue
Block a user