Compare commits
11 Commits
edd715b444
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f2c176d0fd | |||
| e788de8acb | |||
| 20b1f77e9e | |||
| edad4df6e4 | |||
| 24ca90e1ec | |||
| 19d9ec3c55 | |||
| d0fee94598 | |||
| bf6f9d8cae | |||
| df60db78f7 | |||
| 75c995ef98 | |||
| 80a8314b55 |
@@ -11,7 +11,7 @@ if [ -z "${DEVELOP}" ]; then
|
||||
fi
|
||||
|
||||
if [ ${DEVELOP} = "True" ]; then
|
||||
pip3 install --break-system-packages proteus==${TRYTOND_VERSION}
|
||||
pip3 install --break-system-packages proteus==${TRYTOND_VERSION} trytond==${TRYTOND_VERSION}
|
||||
pip3 install --break-system-packages -r .dev/requirements_dev.txt
|
||||
fi
|
||||
|
||||
@@ -19,6 +19,7 @@ fi
|
||||
pip3 install --break-system-packages -r requirements.txt
|
||||
|
||||
pip3 install --break-system-packages trytond==${TRYTOND_VERSION}
|
||||
pip install "python-sql<1.8" --break-system-packages
|
||||
official_modules=".dev/official_modules.txt"
|
||||
|
||||
while IFS= read -r module; do
|
||||
|
||||
@@ -19,6 +19,7 @@ source ${SCRIPT_DIR}/install_module.sh
|
||||
|
||||
# inicializar base de datos
|
||||
# https://docs.tryton.org/projects/server/en/latest/tutorial/module/setup_database.html
|
||||
|
||||
yes admin | trytond-admin -d ${DB_NAME} --all --act
|
||||
|
||||
|
||||
|
||||
23
.env_example
23
.env_example
@@ -1,5 +1,6 @@
|
||||
# TRYTOND operation mode
|
||||
DEVELOP=False
|
||||
WORKER=True
|
||||
|
||||
# Develop mode
|
||||
PUDB_PORT=8025
|
||||
@@ -8,8 +9,30 @@ PUDB_PORT=8025
|
||||
TRYTOND_VERSION=7.6
|
||||
TRYTOND_PORT_LIVE=8090
|
||||
TRYTON_ADMIN_EMAIL=admin@admin.co
|
||||
TRYTON_ADMIN_PASSWORD=s0p0rt3f1n4l*
|
||||
TRYTONPASSFILE=/etc/trytond_admin_pass.conf
|
||||
|
||||
DB_HOSTNAME=db
|
||||
POSTGRES_DB=tryton
|
||||
POSTGRES_USER=tryton
|
||||
POSTGRES_PASSWORD=SUp3r-pass*DB
|
||||
|
||||
# Email user admin
|
||||
EMAIL=domain@domain.com
|
||||
|
||||
SLEEP_TRYTOND_ADMIN=15
|
||||
|
||||
# SMTP
|
||||
SMTP="True"
|
||||
SMTP_TYPE="smtps+ssl"
|
||||
SMTP_USER="user"
|
||||
SMTP_PASSWORD="passsword"
|
||||
SMTP_DOMAIN="domain.com"
|
||||
SMTP_PORT="465"
|
||||
SMTP_FROM="Company CO"
|
||||
SMTP_EMAIL="domain@domain.com"
|
||||
|
||||
# NGINX
|
||||
SERVER_NAME=tryton.domain.com
|
||||
NGINX_PORT=10000
|
||||
VARIABLE=$
|
||||
|
||||
81
Dockerfile_Deploy
Normal file
81
Dockerfile_Deploy
Normal file
@@ -0,0 +1,81 @@
|
||||
# version Trytond server example 5.0
|
||||
ARG TRYTOND_VERSION
|
||||
|
||||
FROM node as builder-node
|
||||
|
||||
ARG TRYTOND_VERSION
|
||||
ARG TRYTONPASSFILE
|
||||
|
||||
ENV SERIES=${TRYTOND_VERSION}
|
||||
|
||||
RUN npm install -g bower
|
||||
RUN curl https://downloads.tryton.org/${SERIES}/tryton-sao-last.tgz | tar zxf - -C /
|
||||
COPY naliia_sao_custom/sao.less /package/src/sao.less
|
||||
RUN cd /package && rm -rf dist && npm install --legacy-peer-deps && npx grunt && bower install --allow-root
|
||||
|
||||
|
||||
FROM tryton/tryton:$TRYTOND_VERSION
|
||||
|
||||
# label custom
|
||||
LABEL org.label-schema.version="$TRYTOND_VERSION"
|
||||
|
||||
ARG TRYTOND_VERSION
|
||||
ARG DEVELOP
|
||||
ARG WORKER
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
git \
|
||||
python3-click \
|
||||
uwsgi \
|
||||
uwsgi-plugin-python3 \
|
||||
libreoffice
|
||||
|
||||
RUN echo "Install modules non official"
|
||||
|
||||
COPY trytond.conf /etc/trytond.conf
|
||||
COPY trytond_worker.conf /etc/trytond_worker.conf
|
||||
COPY gunicorn.conf.py /etc/gunicorn.conf.py
|
||||
|
||||
COPY requirements.txt /opt
|
||||
RUN pip install --break-system-packages -r /opt/requirements.txt
|
||||
COPY start.sh /opt
|
||||
|
||||
COPY trytond_logging.conf /etc/trytond_logging.conf
|
||||
COPY trytond_cron_logging.conf /etc/trytond_cron_logging.conf
|
||||
COPY trytond_worker_logging.conf /etc/trytond_worker_logging.conf
|
||||
|
||||
COPY common_password.txt /etc/common_password.txt
|
||||
|
||||
COPY modules /app/modules
|
||||
|
||||
COPY install_modules.sh /app/install_modules.sh
|
||||
RUN chmod +x /app/install_modules.sh && /bin/bash /app/install_modules.sh
|
||||
|
||||
RUN rm -rf /var/lib/trytond/www
|
||||
|
||||
COPY --from=builder-node /package /var/lib/trytond/www
|
||||
COPY naliia_sao_custom/ /var/lib/trytond/www/
|
||||
|
||||
ARG TRYTONPASSFILE
|
||||
ARG TRYTON_ADMIN_PASSWORD
|
||||
|
||||
ENV TRYTONPASSFILE=/etc/trytond_admin_pass.conf
|
||||
|
||||
|
||||
RUN touch /etc/trytond_populate.conf \
|
||||
&& touch $TRYTONPASSFILE \
|
||||
&& echo $TRYTON_ADMIN_PASSWORD >> $TRYTONPASSFILE \
|
||||
&& chown -R trytond:trytond /etc/trytond* \
|
||||
&& rm -rf /var/log/trytond \
|
||||
&& mkdir /var/log/trytond \
|
||||
&& chown -R trytond:trytond /var/log/trytond \
|
||||
&& rm -rf /mnt/attachment \
|
||||
&& mkdir /mnt/attachment \
|
||||
&& chown -R trytond:trytond /mnt/attachment
|
||||
|
||||
USER trytond
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
@@ -9,11 +9,26 @@ RUN curl https://downloads.tryton.org/${SERIES}/tryton-sao-last.tgz | tar zxf -
|
||||
COPY naliia_sao_custom/sao.less /package/src/sao.less
|
||||
RUN cd /package && bower install --allow-root
|
||||
|
||||
FROM python:3.11-bullseye
|
||||
|
||||
FROM debian:12-slim
|
||||
|
||||
# trytond DB_CACHE requiere commandos `pg_dump` y `pg_restore`
|
||||
RUN apt-get update && apt-get install -y postgresql-client
|
||||
RUN apt-get update && \
|
||||
apt-get install -y postgresql-client python3-pip curl && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# TOMADO DE: https://hg.tryton.org/tryton-docker/file/tip/6.6/Dockerfile
|
||||
COPY --from=builder-node /package /var/lib/trytond/www
|
||||
COPY naliia_sao_custom/ /var/lib/trytond/www/
|
||||
|
||||
ARG TRYTONPASSFILE
|
||||
ARG TRYTON_ADMIN_PASSWORD
|
||||
|
||||
ENV TRYTONPASSFILE=/etc/trytond_admin_pass.conf
|
||||
|
||||
|
||||
RUN touch /etc/trytond_populate.conf \
|
||||
&& touch $TRYTONPASSFILE \
|
||||
&& echo $TRYTON_ADMIN_PASSWORD >> $TRYTONPASSFILE \
|
||||
|
||||
|
||||
43
README.md
43
README.md
@@ -1,6 +1,49 @@
|
||||
Naliia Dev
|
||||
==========
|
||||
|
||||
# Docker Build and Deploy
|
||||
|
||||
## Building and Pushing to Gitea Registry
|
||||
|
||||
To build the Docker image and push to the Gitea registry, run the following commands:
|
||||
|
||||
### 1. Login to Gitea Registry (if not already logged in)
|
||||
|
||||
```bash
|
||||
docker login gitea.onecluster.org
|
||||
```
|
||||
|
||||
### 2. Build the Image
|
||||
|
||||
```bash
|
||||
docker build \
|
||||
--build-arg TRYTOND_VERSION=7.6 \
|
||||
--build-arg TRYTON_ADMIN_PASSWORD='YOUR_PASSWORD' \
|
||||
-t gitea.onecluster.org/aserrador/naliia_7.6_stable:naliia_7.6_stable \
|
||||
-f Dockerfile_Deploy .
|
||||
```
|
||||
|
||||
### 3. Push to Gitea Registry
|
||||
|
||||
```bash
|
||||
docker push gitea.onecluster.org/aserrador/naliia_7.6_stable:naliia_7.6_stable
|
||||
```
|
||||
|
||||
## Image Details
|
||||
|
||||
- **Registry**: `gitea.onecluster.org`
|
||||
- **Repository**: `aserrador/naliia_7.6_stable`
|
||||
- **Tag**: `naliia_7.6_stable`
|
||||
- **TrytonD Version**: 7.6
|
||||
|
||||
## Pull the Image
|
||||
|
||||
To pull the image on another machine:
|
||||
|
||||
```bash
|
||||
docker pull gitea.onecluster.org/aserrador/naliia_7.6_stable:naliia_7.6_stable
|
||||
```
|
||||
|
||||
# Incorporando un Repositorio Git Existente como Submódulo en el Repositorio Activo
|
||||
|
||||
1. Para agregar un nuevo submódulo, utiliza el comando git submodule add, especificando la URL absoluta o relativa del proyecto a rastrear. En este ejemplo, dentro del repositorio oc-monorepo, se incluye la rama 6.8 de la siguiente manera:
|
||||
|
||||
2
Rakefile
2
Rakefile
@@ -125,7 +125,7 @@ namespace :git do
|
||||
end
|
||||
|
||||
def compose(*arg, compose: DOCKER_COMPOSE)
|
||||
sh "docker-compose -f #{compose} #{arg.join(' ')}"
|
||||
sh "docker compose -f #{compose} #{arg.join(' ')}"
|
||||
end
|
||||
|
||||
def refresh_cache
|
||||
|
||||
401715
common_password.txt
Normal file
401715
common_password.txt
Normal file
File diff suppressed because one or more lines are too long
80
compose.deploy.yaml
Normal file
80
compose.deploy.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres
|
||||
hostname:
|
||||
${DB_HOSTNAME}
|
||||
volumes:
|
||||
- postgres:/var/lib/postgresql
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
tryton:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: Dockerfile_Deploy
|
||||
args:
|
||||
TRYTOND_VERSION: ${TRYTOND_VERSION}
|
||||
EMAIL: admin@admin.org
|
||||
WORKER: True
|
||||
image: tryton/${POSTGRES_DB}:${TRYTOND_VERSION}
|
||||
healthcheck:
|
||||
test: curl --fail localhost:8000 || exit 1
|
||||
interval: 30s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
timeout: 20s
|
||||
ports:
|
||||
- "${TRYTON_PORT:-8000}:8000"
|
||||
volumes:
|
||||
- .:/app
|
||||
- var:/var
|
||||
- attachment:/mnt/attachment
|
||||
environment:
|
||||
- TRYTOND_DATABASE_URI=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOSTNAME}:5432/
|
||||
depends_on:
|
||||
- db
|
||||
env_file:
|
||||
- .env
|
||||
working_dir: /app
|
||||
nginx:
|
||||
image: nginx:1.23.3
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/conf.d/nginx.conf.template
|
||||
ports:
|
||||
- "${NGINX_PORT:-10000}:${NGINX_PORT:-10000}"
|
||||
env_file:
|
||||
- .env
|
||||
depends_on:
|
||||
- tryton
|
||||
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/nginx.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
|
||||
tryton_worker:
|
||||
image: tryton/${POSTGRES_DB}:${TRYTOND_VERSION}
|
||||
depends_on:
|
||||
tryton:
|
||||
condition: service_healthy
|
||||
entrypoint: [ "bash", "-c", "/entrypoint.sh trytond-worker -c /etc/trytond_worker.conf -d ${POSTGRES_DB} --logconf /etc/trytond_worker_logging.conf"]
|
||||
volumes:
|
||||
- .:/app
|
||||
environment:
|
||||
- TRYTOND_DATABASE_URI=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOSTNAME}:5432/
|
||||
env_file:
|
||||
- .env
|
||||
working_dir: /app
|
||||
tryton_cron:
|
||||
image: tryton/${POSTGRES_DB}:${TRYTOND_VERSION}
|
||||
depends_on:
|
||||
tryton:
|
||||
condition: service_healthy
|
||||
entrypoint: [ "bash", "-c", "/entrypoint.sh trytond-cron -c /etc/trytond.conf -d ${POSTGRES_DB} --logconf /etc/trytond_cron_logging.conf"]
|
||||
volumes:
|
||||
- .:/app
|
||||
environment:
|
||||
- TRYTOND_DATABASE_URI=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOSTNAME}:5432/
|
||||
env_file:
|
||||
- .env
|
||||
working_dir: /app
|
||||
volumes:
|
||||
var:
|
||||
postgres:
|
||||
attachment:
|
||||
@@ -11,6 +11,7 @@ services:
|
||||
dockerfile: Dockerfile_Live
|
||||
args:
|
||||
TRYTOND_VERSION: ${TRYTOND_VERSION}
|
||||
TRYTON_ADMIN_PASSWORD: ${TRYTON_ADMIN_PASSWORD:-admin}
|
||||
depends_on:
|
||||
- db
|
||||
command: bash .dev/run.sh
|
||||
|
||||
26
gunicorn.conf.py
Normal file
26
gunicorn.conf.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import os
|
||||
|
||||
wsgi_app = 'trytond.application:app'
|
||||
bind = '0.0.0.0:8000'
|
||||
|
||||
# Number of worker processes
|
||||
workers = 2
|
||||
|
||||
# Worker class
|
||||
worker_class = "sync" # or "gevent" for I/O-bound tasks
|
||||
|
||||
# Timeout for requests
|
||||
timeout= 500
|
||||
|
||||
# Preload application
|
||||
preload_app = True
|
||||
|
||||
# Keep-alive
|
||||
keepalive = 5
|
||||
|
||||
raw_env = [
|
||||
'TRYTOND_CONFIG=%s' % os.environ.get('TRYTOND_CONFIG', ''),
|
||||
'TRYTOND_DATABASE_URI=%s' % os.environ.get('TRYTOND_DATABASE_URI', ''),
|
||||
'PYTHONOPTIMIZE=%s' % os.environ.get('PYTHONOPTIMIZE'),
|
||||
]
|
||||
|
||||
40
install_modules.sh
Executable file
40
install_modules.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -e # Exit on error
|
||||
|
||||
echo "Files in /app directory:"
|
||||
ls -la /app/
|
||||
|
||||
if [ -d "/app/modules" ] && [ "$(ls -A /app/modules)" ]; then
|
||||
module_names=()
|
||||
for module in /app/modules/*/; do
|
||||
echo "Processing module: $module"
|
||||
|
||||
pushd "$module" > /dev/null
|
||||
|
||||
# Install dependencies
|
||||
pip3 install . --break-system-packages
|
||||
|
||||
# Extract module name
|
||||
trytond_modules_path=$(pip3 show trytond | grep Location | sed -nr 's/Location: +//gp')/trytond/modules
|
||||
module_name=$(cat "setup.py" | grep -A 1 "\[trytond.modules\]" | sed 1d | cut -d '=' -f 1 | tr -d ' \n')
|
||||
|
||||
# Add to array
|
||||
module_names+=("$module_name")
|
||||
|
||||
# Validate path
|
||||
if [ ! -d "$trytond_modules_path" ]; then
|
||||
echo "ERROR: Failed to locate trytond modules path" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create symlink (fix: use direct path, not $SRC)
|
||||
ln -sf "$module" "$trytond_modules_path/$module_name"
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
# Create colon-separated list
|
||||
module_names=$(IFS=:; echo "${module_names[*]}")
|
||||
echo "Installed modules: $module_names"
|
||||
fi
|
||||
Submodule modules/account_co_pyme updated: e49d942e46...cdd436f667
Submodule modules/naliia updated: eb817059c9...c86e7b0088
Submodule modules/naliia_payment updated: 60bfb9f20c...d9db31eb18
Submodule modules/naliia_shop updated: 02f61d176f...0694c46219
Submodule modules/party_co updated: b80e2dbf45...0e1effd027
Submodule modules/purchase_one_click updated: 823ec91563...7e6369061b
Submodule modules/sale_one_click updated: dddb2b955b...b2672e926e
Submodule modules/sale_payment updated: 5e18fa68a3...e130ae7f9d
Submodule modules/sale_pos updated: 01ebdcda0c...0a3081d6c6
19
nginx.conf
Normal file
19
nginx.conf
Normal file
@@ -0,0 +1,19 @@
|
||||
server {
|
||||
server_name ${SERVER_NAME};
|
||||
listen ${NGINX_PORT};
|
||||
client_max_body_size 8M;
|
||||
|
||||
sendfile on;
|
||||
send_timeout 500s;
|
||||
|
||||
location / {
|
||||
proxy_pass http://tryton:8000/; # "trytond" is the service name of another Docker container on port 8000
|
||||
proxy_read_timeout 500;
|
||||
proxy_connect_timeout 500;
|
||||
proxy_send_timeout 500;
|
||||
proxy_set_header Host ${VARIABLE}host;
|
||||
proxy_set_header X-Real-IP ${VARIABLE}remote_addr;
|
||||
proxy_set_header X-Forwarded-For ${VARIABLE}proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host ${VARIABLE}server_name;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,6 @@ honcho==2.0.0
|
||||
pudb==2025.1
|
||||
urwid==3.0.2
|
||||
freezegun==1.5.1
|
||||
psycopg2==2.9.10
|
||||
psycopg2-binary==2.9.11
|
||||
pycountry==24.6.1
|
||||
|
||||
|
||||
26
start.sh
Normal file
26
start.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
if [ -s /etc/trytond_populate.conf ]; then
|
||||
if [ "$DEVELOP" == "True" ]; then
|
||||
if [ "$WORKER" == "True" ]; then
|
||||
trytond -c /etc/trytond.conf --dev --logconf /etc/trytond_logging.conf
|
||||
# trytond-cron -c /etc/trytond.conf --dev --logconf /etc/trytond_cron_logging.conf &
|
||||
# trytond-worker -c /etc/trytond.conf -d miac --dev --logconf /etc/trytond_worker_logging.conf
|
||||
else
|
||||
trytond -c /etc/trytond.conf --dev --logconf /etc/trytond_logging.conf
|
||||
# trytond-cron -c /etc/trytond.conf --dev --logconf /etc/trytond_cron_logging.conf
|
||||
fi
|
||||
elif [ "$WORKER" == "True" ]; then
|
||||
# trytond-cron -c /etc/trytond.conf --dev --logconf /etc/trytond_cron_logging.conf &
|
||||
# trytond-worker -c /etc/trytond.conf -d miac --logconf /etc/trytond_worker_logging.conf &
|
||||
gunicorn --config=/etc/gunicorn.conf.py
|
||||
else
|
||||
gunicorn --config=/etc/gunicorn.conf.py
|
||||
fi
|
||||
else
|
||||
sleep $SLEEP_TRYTOND_ADMIN && echo $TRYTONADMINPASS > $TRYTONPASSFILE
|
||||
|
||||
trytond-admin -c /etc/trytond.conf -d $POSTGRES_DB --all --email $EMAIL -vv
|
||||
|
||||
echo "1" > /etc/trytond_populate.conf && /bin/bash /opt/start.sh
|
||||
fi
|
||||
15
trytond.conf
Normal file
15
trytond.conf
Normal file
@@ -0,0 +1,15 @@
|
||||
[web]
|
||||
listen=0.0.0.0:8000
|
||||
root=/var/lib/trytond/www
|
||||
cors=
|
||||
https://appdemo.naliia.co
|
||||
https://app.naliia.co
|
||||
|
||||
|
||||
[database]
|
||||
list=True
|
||||
path=/mnt/attachment
|
||||
lenguage=es
|
||||
|
||||
[password]
|
||||
forbidden=/etc/common_password.txt
|
||||
26
trytond_cron_logging.conf
Normal file
26
trytond_cron_logging.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
[formatters]
|
||||
keys=simple
|
||||
|
||||
[handlers]
|
||||
keys=rotate,console
|
||||
|
||||
[loggers]
|
||||
keys=root
|
||||
|
||||
[formatter_simple]
|
||||
format=[%(asctime)s] %(levelname)s:%(name)s:%(message)s
|
||||
datefmt=%a %b %d %H:%M:%S %Y
|
||||
|
||||
[handler_rotate]
|
||||
class=handlers.TimedRotatingFileHandler
|
||||
args=('/var/log/trytond/trytond_cron.log', 'D', 1, 30)
|
||||
formatter=simple
|
||||
|
||||
[handler_console]
|
||||
class=StreamHandler
|
||||
formatter=simple
|
||||
args=(sys.stdout,)
|
||||
|
||||
[logger_root]
|
||||
level=INFO
|
||||
handlers=rotate,console
|
||||
26
trytond_logging.conf
Normal file
26
trytond_logging.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
[formatters]
|
||||
keys=simple
|
||||
|
||||
[handlers]
|
||||
keys=rotate,console
|
||||
|
||||
[loggers]
|
||||
keys=root
|
||||
|
||||
[formatter_simple]
|
||||
format=[%(asctime)s] %(levelname)s:%(name)s:%(message)s
|
||||
datefmt=%a %b %d %H:%M:%S %Y
|
||||
|
||||
[handler_rotate]
|
||||
class=handlers.TimedRotatingFileHandler
|
||||
args=('/var/log/trytond/trytond.log', 'D', 1, 30)
|
||||
formatter=simple
|
||||
|
||||
[handler_console]
|
||||
class=StreamHandler
|
||||
formatter=simple
|
||||
args=(sys.stdout,)
|
||||
|
||||
[logger_root]
|
||||
level=INFO
|
||||
handlers=rotate,console
|
||||
14
trytond_worker.conf
Normal file
14
trytond_worker.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
[web]
|
||||
listen=0.0.0.0:8000
|
||||
root=/var/lib/trytond/www
|
||||
|
||||
[database]
|
||||
list=True
|
||||
path=/mnt/attachment
|
||||
lenguage=es
|
||||
|
||||
[password]
|
||||
forbidden=/etc/common_password.txt
|
||||
|
||||
[queue]
|
||||
worker = True
|
||||
26
trytond_worker_logging.conf
Normal file
26
trytond_worker_logging.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
[formatters]
|
||||
keys=simple
|
||||
|
||||
[handlers]
|
||||
keys=rotate,console
|
||||
|
||||
[loggers]
|
||||
keys=root
|
||||
|
||||
[formatter_simple]
|
||||
format=[%(asctime)s] %(levelname)s:%(name)s:%(message)s
|
||||
datefmt=%a %b %d %H:%M:%S %Y
|
||||
|
||||
[handler_rotate]
|
||||
class=handlers.TimedRotatingFileHandler
|
||||
args=('/var/log/trytond/trytond_worker.log', 'D', 1, 30)
|
||||
formatter=simple
|
||||
|
||||
[handler_console]
|
||||
class=StreamHandler
|
||||
formatter=simple
|
||||
args=(sys.stdout,)
|
||||
|
||||
[logger_root]
|
||||
level=INFO
|
||||
handlers=rotate,console
|
||||
2
web_app
2
web_app
Submodule web_app updated: 2cf7dedb79...4cfbf31611
Reference in New Issue
Block a user