wip
This commit is contained in:
parent
43461e90c7
commit
ecfed33614
|
@ -9,4 +9,4 @@ ENV SETUPTOOLS_SCM_PRETEND_VERSION=${PROJECT_VERSION}
|
|||
|
||||
RUN pdm install
|
||||
RUN apt-get remove -y gcc libpq-dev && apt-get autoremove -y
|
||||
ENTRYPOINT ["pdm","run","trytond", "-c", "/app/etc/docker.ini", "-v", "-d", "bij1"]
|
||||
CMD pdm run gunicorn --config=/app/etc/gunicorn.conf.py
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
erp:
|
||||
image: registry.bij1.org/bij1.erp:${DOCKER_TAG}
|
||||
command: pdm run gunicorn --config=/app/etc/trytond.conf.py
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
env_file:
|
||||
- ./env
|
||||
ports:
|
||||
- "8000:8000"
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
logging:
|
||||
driver: journald
|
||||
api:
|
||||
image: registry.bij1.org/bij1.erp:${DOCKER_TAG}
|
||||
command: pdm run gunicorn bij1.api.main:app -w 4 -k uvicorn.workers.UvicornWorker --port 5000
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
env_file:
|
||||
- ./env
|
||||
ports:
|
||||
- "5000:5000"
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
logging:
|
||||
driver: journald
|
|
@ -0,0 +1,15 @@
|
|||
import os
|
||||
import multiprocessing
|
||||
|
||||
|
||||
TRYTOND_CONFIG = os.environ.get("TRYTOND_CONFIG", "/app/etc/docker.ini")
|
||||
TRYTOND_DATABASE_NAMES = os.environ.get("TRYTOND_DATABASE_NAMES", "bij1")
|
||||
|
||||
raw_env = [
|
||||
f"TRYTOND_CONFIG={TRYTOND_CONFIG}",
|
||||
f"TRYTOND_DATABASE_NAMES={TRYTOND_DATABASE_NAMES}",
|
||||
]
|
||||
bind = "127.0.0.1:8000"
|
||||
workers = multiprocessing.cpu_count() * 2 + 1
|
||||
|
||||
wsgi_app = "trytond.application:app"
|
|
@ -44,16 +44,22 @@ dev = [
|
|||
"pytest-trytond>=0.1.0",
|
||||
]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = "tests/"
|
||||
|
||||
[tool.setuptools_scm]
|
||||
[tool.setuptools_scm]
|
||||
version_scheme = "guess-next-dev"
|
||||
local_scheme = "no-local-version"
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
|
||||
[tool.ruff]
|
||||
src = ["src", "tests", "etc"]
|
||||
target-version = "py311"
|
||||
extend-ignore = ["F403", "F405", "E402"]
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools", "setuptools-scm"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
|
Loading…
Reference in New Issue