GithubHelp home page GithubHelp logo

chornonoh-vova / image-hosting-example Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 218 KB

Simple application for storing images to showcase principles of web distributed systems design

JavaScript 93.52% Dockerfile 6.48%

image-hosting-example's Introduction

Image hosting application example

This application was created as an example to my university work.

Building docker images

(Optionally) pull images, required in stack

You can pull images, used in this example, before building and starting application.

# Node LTS
# used for services
docker pull node:12.13.0-alpine
# MongoDB
# used as storage for additional image data
docker pull mongo:3.4.23

Build image for read service

Command needs to be executed from the root of repository.

docker build \
  --file Dockerfile \
  --build-arg NPM_TOKEN=${NPM_TOKEN} \
  --build-arg SERVICE='read-service' \
  --tag image-read-service .

Build image for write service

Command needs to be executed from the root of repository.

docker build \
  --file Dockerfile \
  --build-arg NPM_TOKEN=${NPM_TOKEN} \
  --build-arg SERVICE='write-service' \
  --tag image-write-service .

Starting application

Start the stack

# only initialize swarm if it was not initialized before
docker swarm init

docker stack deploy \
  --compose-file docker-compose.yml \
  image_hosting

Stopping application

docker stack rm image_hosting

image-hosting-example's People

Contributors

chornonoh-vova avatar

Stargazers

Roman avatar

Watchers

 avatar

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.