Skip to content

digital-cube/base3example-contacts

Repository files navigation

License: GPL v3 Python v3

BASE3 Example - Simple Contacts service

Installation

1) Checkout code and submodules

    git clone https://github.com/digital-cube/base3example-contacts.git
    cd base3example-contacts
    git submodule update --init --recursive

2) Create keys in users service

    cd users/keys
    ssh-keygen -t rsa -b 1024 -m PEM -f jwt.private_key
    openssl rsa -in jwt.private_key -pubout -outform PEM -out jwt.public_key
    rm jwt.private_key.pub
    cd ../..

3) Run application in docker

    docker-compose up

4) Run tests and app locally

To run services and test locally, you need to have installed postgres sql database and redis.

In postgres create user demo, and the following databases: demo, test_demo, demo_contacts, test_demo_contacts, demo_users and test_demo_users

    cd users
    python3 -m venv .venv
    .venv/bin/pip install -r requirements.txt

    cd ../mailer
    python3 -m venv .venv
    .venv/bin/pip install -r requirements.txt

    cd ../contacts
    python3 -m venv .venv
    .venv/bin/pip install -r requirements.txt

    cd ..
    python3 -m venv .venv
    .venv/bin/pip install -r requirements.txt

    #run tests
    ./alltests.sh

    #start monolith version of app
    ./.venv/bin/python app.py 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published