Docker, AWS ▰ How to split monolith into microservices Believe that: ▰ Any problem must be solved at the right level ▰ Most of the difficulties are with people, not with technologies ▰ A problem should be highlighted, an idea should be "sold", a solution should be demonstrated Last Talks: ▰ Contract First ▰ Technical backlog usage instructions ▰ 5 production Node.js stories ▰ Testing in Node.js World ▰ TypeScript for Node.js applications Links: Site GitHub Twitter Facebook 2
unofficial images for any OS, tools, etc ▰ There are free public and paid private accounts ▰ Default registry for Docker ▰ In short: analogy of npmjs.com What is hub.docker.com? 4
Choose any useful tool what you want to test. ▰ If native install of the tool is boring or long or will pollute your computer, then it will make good case for docker usage. ▰ Use kitematic or search hub.docker.com ▰ Check the first results! How to Start Working with Docker? 8
lost with a docker container. I changed the server to another image and remove the container. I didn’t know about volume. I used latest tag. Minecraft Story 10
are read-write by default, but there's an :ro flag ▰ Use port mappings ▰ Don’t use config for application inside docker, use environment variables ▰ Use kitematic, but know terminal docker commands Use Docker Container Right 11
▰ Bus (Redis, RabbitMQ) ▰ Nginx or httpd ▰ Jenkins our CI ▰ Mailhog Web and API based SMTP testing ▰ Verdaccio Lightweight private npm proxy registry ▰ Dredd Abao contract testing
is running as an isolated process (maybe with children processes). ▰ Images are frozen immutable snapshots of live containers. ▰ Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. ▰ Read in the glossary. Terminology 14
order, needed to build a given image. JS analogy: Inheritance Creating Docker images 16 docker commit command This method to create an image is not reproducible and should be completely avoided. JS analogy: memory snapshot
image(-s) for BE ▰ Use environment variables for storing your backend host ▰ Use nginx or nginx-like tool for serve FE files ▰ Use native tools on your machine for development ▻ Node.js ▻ Webpack ▻ etc How develop FE without pain? 19
application are described in docker-compose.yml and started as containers ▰ The application is configured with environment variables ▰ [Advice] Use dotenv-safe package, then ▰ [Advice] Described the list of required for environment variables in .env.example ▰ [Advice] Use native Node.js development with .env file
npm start to npm test ▰ Use --abort-on-container-exit and --exit-code-from ▰ Example docker build -t $name:$version . || exit 1 docker-compose up --abort-on-container-exit --exit-code-from $name; export TEST_RESULT=$? docker-compose down exit $TEST_RESULT
project with parsing SPA sites. ▰ I chose docker-compose with Selenium Grid ▰ Customer asked to deploy the solution to his server without docker-compose. The deploy was PITA. ▰ Project was failed. There was no technical expertise in the customer company for supporting and increasing Selenium Grid.
COPY package.json . COPY package-lock.json . RUN npm install --production ADD . /microservice EXPOSE 8080 ENTRYPOINT ["npm", "start"] 30 Any new line is an intermediate image, which is called layer.
There are significant number of tools, including git, g++, imagemagick,etc. Size more 650MB Slim Built from Debian Linux. There are not such tools as in Full image. Size starts from 250MB Alpine Build from Alpine Linux, the distribution that was almost purpose-built for Docker images and other small, container-like uses Size starts from 5MB 31