feat: Add .env
This commit is contained in:
23
.env.example
Normal file
23
.env.example
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Naliia
|
||||||
|
NALIIA_IMAGE="gitea.onecluster.org/aserrador/naliia:latest"
|
||||||
|
|
||||||
|
# Tryton
|
||||||
|
EMAIL="admin@admin.org"
|
||||||
|
TRYTON_PORT=8000
|
||||||
|
|
||||||
|
# Database
|
||||||
|
DB_HOSTNAME="db"
|
||||||
|
POSTGRES_DB="database"
|
||||||
|
POSTGRES_USER="postgres"
|
||||||
|
POSTGRES_PASSWORD="SUp3r-pass*DB"
|
||||||
|
TRYTOND_DATABASE_URI="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOSTNAME}:5432/"
|
||||||
|
|
||||||
|
# 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"
|
||||||
228
.gitignore
vendored
Normal file
228
.gitignore
vendored
Normal file
@@ -0,0 +1,228 @@
|
|||||||
|
# ---> Python
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
*.bk
|
||||||
|
|
||||||
|
/.vscode
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
bin/
|
||||||
|
include/
|
||||||
|
wheels/
|
||||||
|
__pycache__
|
||||||
|
trytond_miac.egg-info/
|
||||||
|
pip-wheel-metadata/
|
||||||
|
share/python-wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script fkrom a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.nox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
*.py,cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
db.sqlite3-journal
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# pipenv
|
||||||
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||||
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||||
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||||
|
# install all needed dependencies.
|
||||||
|
#Pipfile.lock
|
||||||
|
|
||||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
||||||
|
__pypackages__/
|
||||||
|
|
||||||
|
# Celery stuff
|
||||||
|
celerybeat-schedule
|
||||||
|
celerybeat.pid
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
.dmypy.json
|
||||||
|
dmypy.json
|
||||||
|
|
||||||
|
# Pyre type checker
|
||||||
|
.pyre/
|
||||||
|
|
||||||
|
# ---> Emacs
|
||||||
|
# -*- mode: gitignore; -*-
|
||||||
|
*~
|
||||||
|
.~*
|
||||||
|
*#
|
||||||
|
\#*\#
|
||||||
|
/.emacs.desktop
|
||||||
|
/.emacs.desktop.lock
|
||||||
|
*.elc
|
||||||
|
auto-save-list
|
||||||
|
tramp
|
||||||
|
.\#*
|
||||||
|
|
||||||
|
# Org-mode
|
||||||
|
.org-id-locations
|
||||||
|
*_archive
|
||||||
|
|
||||||
|
# flymake-mode
|
||||||
|
*_flymake.*
|
||||||
|
|
||||||
|
# eshell files
|
||||||
|
/eshell/history
|
||||||
|
/eshell/lastdir
|
||||||
|
|
||||||
|
# elpa packages
|
||||||
|
/elpa/
|
||||||
|
|
||||||
|
# reftex files
|
||||||
|
*.rel
|
||||||
|
|
||||||
|
# AUCTeX auto folder
|
||||||
|
/auto/
|
||||||
|
|
||||||
|
# cask packages
|
||||||
|
.cask/
|
||||||
|
dist/
|
||||||
|
|
||||||
|
# Flycheck
|
||||||
|
flycheck_*.el
|
||||||
|
|
||||||
|
# server auth directory
|
||||||
|
/server/
|
||||||
|
|
||||||
|
# projectiles files
|
||||||
|
.projectile
|
||||||
|
|
||||||
|
# directory configuration
|
||||||
|
.dir-locals.el
|
||||||
|
|
||||||
|
# network security
|
||||||
|
/network-security.data
|
||||||
|
|
||||||
|
|
||||||
|
# ---> Vim
|
||||||
|
# Swap
|
||||||
|
[._]*.s[a-v][a-z]
|
||||||
|
!*.svg # comment out if you don't need vector files
|
||||||
|
[._]*.sw[a-p]
|
||||||
|
[._]s[a-rt-v][a-z]
|
||||||
|
[._]ss[a-gi-z]
|
||||||
|
[._]sw[a-p]
|
||||||
|
|
||||||
|
# Session
|
||||||
|
Session.vim
|
||||||
|
Sessionx.vim
|
||||||
|
|
||||||
|
# Temporary
|
||||||
|
.netrwhist
|
||||||
|
*~
|
||||||
|
# Auto-generated tag files
|
||||||
|
tags
|
||||||
|
# Persistent undo
|
||||||
|
[._]*.un~
|
||||||
|
|
||||||
|
# ---> VirtualEnv
|
||||||
|
# Virtualenv
|
||||||
|
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
|
||||||
|
.Python
|
||||||
|
[Bb]in
|
||||||
|
[Ii]nclude
|
||||||
|
[Ll]ib
|
||||||
|
[Ll]ib64
|
||||||
|
[Ll]ocal
|
||||||
|
[Ss]cripts
|
||||||
|
pyvenv.cfg
|
||||||
|
.venv
|
||||||
|
pip-selfcheck.json
|
||||||
|
|
||||||
|
.tdd_cache
|
||||||
|
app
|
||||||
@@ -8,12 +8,13 @@ services:
|
|||||||
POSTGRES_DB: ${POSTGRES_DB:-naliia}
|
POSTGRES_DB: ${POSTGRES_DB:-naliia}
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-SUp3r-pass*DB}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-SUp3r-pass*DB}
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-naliia}"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
|
||||||
tryton:
|
tryton:
|
||||||
image: ${NALIIA_IMAGE}
|
image: ${NALIIA_IMAGE}
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
@@ -22,9 +23,11 @@ services:
|
|||||||
- var:/var
|
- var:/var
|
||||||
- attachment:/mnt/attachment
|
- attachment:/mnt/attachment
|
||||||
environment:
|
environment:
|
||||||
TRYTOND_DATABASE_URI: ${TRYTOND_DATABASE_URI:-postgresql://postgres:SUp3r-pass*DB@db:5432/}
|
TRYTOND_DATABASE_URI: ${TRYTOND_DATABASE_URI:-postgresql://${POSTGRES_USER:-naliia}:${POSTGRES_PASSWORD:-SUp3r-pass*DB}@${DB_HOSTNAME:-db}:5432/}
|
||||||
NALIIA_IMAGE: ${NALIIA_IMAGE:-gitea.onecluster.org/aserrador/naliia:latest}
|
NALIIA_IMAGE: ${NALIIA_IMAGE:-gitea.onecluster.org/aserrador/naliia:latest}
|
||||||
EMAIL: ${EMAIL:-admin@admin.org}
|
EMAIL: ${EMAIL:-admin@admin.org}
|
||||||
|
ports:
|
||||||
|
- "${TRYTON_PORT:-8000}:8000"
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -36,32 +39,39 @@ services:
|
|||||||
timeout: 20s
|
timeout: 20s
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
image: ${NALIIA_IMAGE}
|
image: ${NALIIA_IMAGE}
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
depends_on:
|
depends_on:
|
||||||
tryton:
|
tryton:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
entrypoint: [ "bash", "-c", "/entrypoint.sh trytond-worker -c /etc/trytond_worker.conf -d ${POSTGRES_DB} --logconf /etc/trytond_worker_logging.conf"]
|
entrypoint: [ "bash", "-c", "/entrypoint.sh trytond-worker -c /etc/trytond_worker.conf -d ${POSTGRES_DB} --logconf /etc/trytond_worker_logging.conf"]
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
environment:
|
environment:
|
||||||
TRYTOND_DATABASE_URI: ${TRYTOND_DATABASE_URI:-postgresql://postgres:SUp3r-pass*DB@db:5432/}
|
TRYTOND_DATABASE_URI: ${TRYTOND_DATABASE_URI:-postgresql://${POSTGRES_USER:-naliia}:${POSTGRES_PASSWORD:-SUp3r-pass*DB}@${DB_HOSTNAME:-db}:5432/}
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
|
||||||
cron:
|
cron:
|
||||||
image: ${NALIIA_IMAGE}
|
image: ${NALIIA_IMAGE}
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
depends_on:
|
depends_on:
|
||||||
tryton:
|
tryton:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
entrypoint: [ "bash", "-c", "/entrypoint.sh trytond-cron -c /etc/trytond.conf -d ${POSTGRES_DB} --logconf /etc/trytond_cron_logging.conf"]
|
entrypoint: [ "bash", "-c", "/entrypoint.sh trytond-cron -c /etc/trytond.conf -d ${POSTGRES_DB} --logconf /etc/trytond_cron_logging.conf"]
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
environment:
|
environment:
|
||||||
TRYTOND_DATABASE_URI: ${TRYTOND_DATABASE_URI:-postgresql://postgres:SUp3r-pass*DB@db:5432/}
|
TRYTOND_DATABASE_URI: ${TRYTOND_DATABASE_URI:-postgresql://${POSTGRES_USER:-naliia}:${POSTGRES_PASSWORD:-SUp3r-pass*DB}@${DB_HOSTNAME:-db}:5432/}
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres:
|
postgres:
|
||||||
var:
|
var:
|
||||||
|
|||||||
Reference in New Issue
Block a user