Coder Social home page Coder Social logo

esc's Introduction

esc

Python lint

Code Quality Grade Code Grade

Unit test

Docker

running

# start backend in foreground (port 1337)
docker-compose up backend
# start simulator and customer interface (port 8000)
docker-compose up esc
# start admin interface (port 1338)
docker-compose up admin
# start customer app (port 1339)
docker-compose up app


# other commands

# start backend in the background
docker-compose up -d backend

# run simulator independently (no ports exposed externally)
docker-compose run esc

Backend/API

# build and publish
docker build -t neskoc/pattern:backend -f Dockerfile.api .
docker push neskoc/pattern:backend

# run
docker run --rm  -p 1337:1337 -it neskoc/pattern:backend

## run on pattern_net
docker run --rm --net pattern_net -p 1337:1337 -it neskoc/pattern:backend

### ... with name
docker run --rm --net pattern_net --name backend -p 1337:1337 -it neskoc/pattern:backend

esc

# build and publish
docker build -t neskoc/pattern:esc .
docker push neskoc/pattern:esc

## run on pattern_net
docker run --rm --net pattern_net -p 5000:5000 -it neskoc/pattern:esc

removing images / containers / cleaning up

clean up

docker-compose down

  • remove all stopped containers docker rm $(docker ps -q -a)
  • remove all dangling images docker rmi $(docker images -f "dangling=true" -q)
  • remove container docker rm <id>
  • remove image docker rmi <id>

docker system prune -a

docker-compose.yaml

version: "3"

networks:
    pattern_net:

# använd: docker build -t neskoc/pattern:backend -f Dockerfile.api . 
services:
    backend:
        image: neskoc/pattern:backend
        container_name: "backend"
        expose:
            - "1337"
        ports:
            - "127.0.0.1:1337:1337"
        networks:
            - pattern_net
        # volumes:
        #    - ./api:/api
        restart:
            "always"

    esc:
        image: neskoc/pattern:esc
        container_name: "esc"
        ports:
            - "127.0.0.1:8000:8000"
        networks:
            - pattern_net
        links:
            - backend
        depends_on:
            - backend

    admin:
        image: gusu20/admin-app
        container_name: "admin"
        ports:
            - "127.0.0.1:1338:1338"
        networks:
            - pattern_net
        links:
            - backend
        depends_on:
            - backend
        stdin_open: true

    app:
        image: Orkanen/myapp:latest
        container_name: "app"
        ports:
            - "127.0.0.1:1339:1339"
        networks:
            - pattern_net
        links:
            - backend
        depends_on:
            - backend

esc's People

Contributors

neskoc avatar github-actions[bot] avatar

Watchers

Filip Antonsson avatar  avatar

Forkers

neskoc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.