Sign inSign up

wipal194/stpc-api

By wipal194

Updated over 6 years ago

Image
0

302

wipal194/stpc-api repository overview

Stupid cooking REST API

Requirements

Installation

Deploy

sudo docker container ls
sudo docker stop <ContainerID>


sudo docker image build --rm -t stpc:1.0 .
sudo docker image build --rm -t nginx:latest .

sudo docker container run -p 80:80 nginx:latest .
sudo docker container run -d --rm -p 8194:8000 --name stpc stpc:1.0 --env APP_ENV="dev" 
sudo docker container run -d --rm -p 8194:8000 --name stpc stpc:1.0 --env APP_ENV="live" 

sudo docker pull wipal194/stpc-api:latest
sudo docker container run -d --rm -p 8194:8000 wipal194/stpc-api:latest --env APP_ENV="dev" 
sudo docker container run -d --rm -p 8194:8000 wipal194/stpc-api:latest --env APP_ENV="live" 

=> Reattach
sudo docker attach --sig-proxy=false <ContainerID>

=> Get list container
sudo docker container ls -a

=> Check health
docker inspect --format=&apos;{{json .State.Health}}&apos; db

=> View logs
docker cp stpc_api:/app/log/app.log .

=> exec
docker exec -it some-image /bin/bash


########Product

Update .env

Update docker-compose: 
    - database  : volumes
    - api       : depends_on, links
    - nginx     : depends_on, links

Update nginx
    - database.conf : port
    - api.conf      : port
    

Tag summary

Content type

Image

Digest

Size

362.5 MB

Last updated

over 6 years ago

docker pull wipal194/stpc-api