oc-docker-tryton-non-official/README.md

142 lines
4.4 KiB
Markdown
Raw Permalink Normal View History

2023-06-05 17:38:55 +02:00
![Diagram deploy](diagram.png "Deploy")
2022-01-06 17:05:46 +01:00
# Description
2022-01-05 23:19:00 +01:00
Docker tryton-non_official It is a tool for deploying unofficial Tryton modules in Docker, including:
1. Gnuhealth
2. Kalenis
3. NaNtic
4. Datalife
5. Presik
6. Trytonar
2022-01-26 02:25:43 +01:00
7. OneTeam
2022-01-05 23:19:00 +01:00
8. Etrivial
> Gnuhealth and Etrivial most be work whit tryton5.0
2022-01-19 20:22:46 +01:00
2023-08-14 18:57:53 +02:00
| Nombre | Descripción |
| -------------- | ------------------ |
| Trytond | Servidor de Tryton |
| Trytond-Worker | Ejecución de colas |
| Trytond-Cron | Tareas programadas |
| Nginx | uso con Uwsgi |
# Unofficial Providers
| Name | Estiamted Modules | Versions | Web Site | Repositories
| --------- | -------------- | ------------------ | -------------------------- | ---------------
| Gnuhealth | | 5.0, 6.0 | https://www.gnuhealth.org/ |
| Kalenis | 33 | 6.0 | https://kalenislims.com/ | https://gitea.onecluster.org/Kalenis
| NaNtic | 1150 | 6.0, 6.4, 6.8 | https://www.nan-tic.com/es | https://github.com/NaN-tic
| Datalife | 200 | 6.0 | https://datalifeit.es/ | https://gitlab.com/datalifeit/trytond-stock_unit_load
| Presik | 180 | 6.0 | https://presik.com/ | https://bitbucket.org/presik/
| Trytonar | 31 | 6.0 | https://www.tryton.org.ar/ | https://github.com/tryton-ar/
| OneTeam | 26 | 6.0, 6.2, 6.4, 6.6 | | https://git.disroot.org/OneTeam
# Docker versions of Tryton and Python
| Tryton | Python |
| ------ | ------ |
| 5.0 | 3.7 |
| 6.0 | 3.7 |
| 6.2 | 3.7 |
| 6.4 | 3.7 |
| 6.6 | 3.9 |
| 6.8 | 3.9 |
2022-01-05 23:19:00 +01:00
# Dependencies:
Have **docker** 20 or higher installed and **git**
2022-01-26 02:25:43 +01:00
[Multi migrate to gitea](https://git.disroot.org/OneTeam/oc-multi_migrate_to_gitea) will be called at the time of the creation of the docker
2022-01-05 23:19:00 +01:00
# Prerequisites
2022-05-24 17:50:05 +02:00
> If you going to use tryton 6.2, must be use python3.9.
> This change was done by team tryton.
2022-01-05 23:19:00 +01:00
Clone repository:
```
2022-01-26 02:25:43 +01:00
git clone https://git.disroot.org/OneTeam/oc-docker-tryton-non-official.git
2022-01-19 20:22:46 +01:00
cd oc-docker-tryton-non-official
2022-01-05 23:19:00 +01:00
```
2022-01-26 02:27:12 +01:00
Edit Dockerfile and change lines commented example create Docker OneTeam:
2022-01-06 03:16:55 +01:00
```
#version Trytond server example 6.0
TRYTOND_VERSION=6.6
#python version that will run the docker example 3.7 or 3.9 is mandatory in case you use tryton6.2
PYTHON_VERSION=3.9
2022-01-06 03:16:55 +01:00
#if the module repository is private
GITEA_USER=gitea_user
GITEA_PASSWORD=gitea_password
GITEA_ACCESS_TOKEN=gitea_user_token
#Repository Multi Migrate
REPO_MULTI_MIGRATE=OneTeam/oc-multi_migrate_to_gitea.git
#domain server gitea
GITEA_DOMAIN=git.disroot.org
URL_MULTI_MIGRATE=https://${GITEA_USER}:${GITEA_PASSWORD}@${GITEA_DOMAIN}/OneTeam/oc-multi_migrate_to_gitea.git
#By default all organizations are set to false, activate only one.
#GnuHealth, Etrivial, tryton-ar, OneTeam, OneTeam_Pos, Presik, Datalife, NaNtic, Kalenis
Provider=OneTeam
DIR_MODULES=/usr/local/lib/python${PYTHON_VERSION}/dist-packages/trytond/modules
DB_PASSWORD=SUp3r-pass*DB
POSTGRES_DB=tryton
DB_HOSTNAME=db
POSTGRES_PASSWORD=SUp3r-pass*DB
TRYTON_PORT=8000
DEVELOP=True
WORKER=True
TRYTONPASSFILE=/etc/trytond_admin_pass.conf
#Password user admin
TRYTONADMINPASS=admin
#Email user admin
EMAIL=admin@admin.com
SLEEP_TRYTOND_ADMIN=15
#SMTP
#This value is True or False
SMTP=False
SMTP_TYPE=smtps+ssl
SMTP_USER=
SMTP_PASSWORD=
SMTP_DOMAIN=
SMTP_PORT=465
SMTP_FROM=NAME_FROM <mail>
SMTP_EMAIL=
2022-01-06 03:16:55 +01:00
```
2022-01-05 23:19:00 +01:00
# Usage
2022-01-06 21:56:32 +01:00
Building a profil.
**Note: in case of than you need rebuild your docker image from the beginning, we will have add the option '--no-cache'**
2022-01-06 21:56:32 +01:00
```
docker-compose -p <profile_name> build --no-cache --progress plain
2022-01-06 21:56:32 +01:00
```
Create a project with the previous profile built
2022-01-06 21:56:32 +01:00
```
docker-compose -p <profile_name> up -d
2022-01-06 21:56:32 +01:00
```
# Bassic Commands.
2022-01-06 21:56:32 +01:00
Enter tryton docker service bash.
2023-08-14 18:49:56 +02:00
**Note: 'tryton' is the name assigned into docker-compose.yml for th docker service of tryton,
'/entrypoint.sh' it is import for load environment variables,
2023-08-14 18:49:56 +02:00
'--user' specifies the user.**
2022-01-06 21:56:32 +01:00
```
docker-compose -p <profile_name> exec --user root tryton /entrypoint.sh bash
2022-01-06 21:56:32 +01:00
```
Update list of modules
2022-01-06 21:56:32 +01:00
2022-01-06 22:20:51 +01:00
```
docker-compose -p <profile_name> exec --user root tryton /entrypoint.sh trytond-admin -c /etc/trytond.conf -d <database> -vv -m --all
2022-01-06 22:20:51 +01:00
```
Enter postgres docker service psql.
2022-01-06 22:20:51 +01:00
```
docker-compose -p <profile_name> exec --user postgres db psql
2023-08-14 18:57:53 +02:00
```