Unverified Commit e5686efd by Paul B

[dev] Ajout d'un fichier docker-compose pour lancer tout le système

Ce commit ajoute un fichier docker-compose.yml qui permet d'orchestrer
le démarrage de tout le système :

- Les applis tierces (le code de ce dépôt)
- Une base CouchDB pour les applis tierces
- Un odoo (en version Cooperatic
  https://gitlab.com/lgds/foodcoops/-/tree/9.0-cooperatic )
- Une base PostgreSQL pour Odoo

 ### Todo

- [ ] Fixer le CORS pour couchdb
- [ ] Fixer le démarrage infini du Odoo (lorsque la BDD est vide la
      première fois)
- [ ] Avoir un jeu de donnée simplifié qui permet de jouer avec Odoo ?
parent f4c92c1c
COUCHDB_USER=admin
COUCHDB_PASSWORD=123abc
POSTGRES_USER=foodcoops
POSTGRES_PASSWORD=foodcoops
POSTGRES_DB=foodcoops
version: '3'
services:
app:
build:
context: .
dockerfile: dockerfiles/Dockerfile
env_file: .env
restart: always
ports:
- "8080:8080"
links:
- "couchdb:couchdb"
- "odoo:odoo"
couchdb:
build:
context: .
dockerfile: dockerfiles/Dockerfile.couchdb
env_file: .env
restart: always
ports:
- "5984:5984" # Expose port because it's used by the frontend
volumes:
- "couchdb-data:/opt/couchdb/data"
database:
image: "postgres:13"
env_file: .env
restart: always
volumes:
- "odoo-pg-data:/var/lib/postgresql/data"
odoo:
image: "registry.gitlab.com/lgds/foodcoops:9.0-cooperatic-2021-03-21"
env_file: .env
restart: always
ports:
- "8069:8069"
links:
- "database:database"
volumes:
- "odoo-shared-data:/home/app/.local/share/Odoo"
volumes:
odoo-shared-data:
odoo-pg-data:
couchdb-data:
FROM python:3-slim
# Virtual env:
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
WORKDIR /home/app
# Install dependencies:
COPY requirements.txt /home/app/
RUN pip install -r requirements.txt
# Copy application
ADD . /home/app/
# Run the application:
EXPOSE 8080
CMD ["./launch.sh", "0.0.0.0", "8080"]
FROM couchdb:3
COPY dockerfiles/local.ini /opt/couchdb/etc/
[httpd]
enable_cors = true
[cors]
origins = *
"""Secret data for DB connexion ."""
ODOO = {
'url': 'http://127.0.0.1:8069'
'url': 'http://odoo:8069',
'user': 'api',
'passwd': 'xxxxxxxxxxxx',
'db': 'bd_test',
'passwd': 'changeme',
'db': 'foodcoops',
}
COUCHDB = {
'url': 'http://127.0.0.1:5984',
'url': 'http://couchdb:5984',
'dbs': {
'member': 'coops',
'inventory': 'inventory',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment