Public | Automated Build

Last pushed: a year ago
Short Description
Micro-serviço para cadastro de pessoas.
Full Description

Docker

#!shell
docker-compose build fe_pessoa_server
docker-compose run --rm fe_pessoa_server pip install -r /requirements/development.txt
docker-compose run --rm fe_pessoa_server pip install -r /requirements/production.txt
docker-compose run --rm fe_pessoa_server python manage.py migrate
docker-compose run --rm fe_pessoa_server python manage.py createsuperuser --username=root --email=test@test.com
docker-compose run --rm --name fe_pessoa_server --service-ports fe_pessoa_server /bin/bash

Docker Cleanup

#!shell
docker stop $(docker ps -a -q); docker rm $(docker ps -a -q)
docker rmi $(docker images -f "dangling=true" -q)

Migrations

#!shell
python manage.py migrate fe_core zero
python manage.py migrate fe_pessoa zero
python manage.py makemigrations fe_core
python manage.py makemigrations fe_pessoa
python manage.py migrate fe_core
python manage.py migrate fe_pessoa

Dreamhost

#!shell
cat ~/.ssh/fe_microservices.pub | ssh fems02@klamathfalls.dreamhost.com "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
#!shell
fab -c fab_dreamhost deploy
ssh fems02@klamathfalls.dreamhost.com
manage.py criar_clientes 502b9a512fdf45b482dedd6dd5cb8854

Curl Examples

#!shell
ACCESS_TOKEN=5Nk3fN5sxzEaTOYvMFCn5SZchdqGAh

curl -H "Authorization: Bearer $ACCESS_TOKEN" \
    -d "format=json" \
    http://docker:8020/api/v1/clientes/

Import From Avivit

#!shell
docker run --name mysql_inov_adm_data ubuntu:14.04.2 true
docker run --name mysql_inov_adm \
    --volumes-from=4c7d107da3f2 \
    -e MYSQL_ROOT_PASSWORD=password \
    -e MYSQL_DATABASE=inov_adm \
    -p 3306:3306 \
    -d mysql:5.7.12

docker run --name some-mysql -v /my/own/datadir:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag

Docker Pull Command
Owner
fernandoe
Source Repository

Comments (0)