{
    "componentChunkName": "component---src-templates-docs-js",
    "path": "/deploy-scalable-software/week-2",
    "result": {"data":{"site":{"siteMetadata":{"title":"Linnaeus University","language":"en","courseCode":"2DV013"}},"mdx":{"fields":{"id":"762ffd06-8f6d-50f0-a349-03345a2fe16f","title":"Week 2: A server app in a container","slug":"/deploy-scalable-software/week-2"},"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Week 2: A server app in a container\",\n  \"metaTitle\": \"2DV013 | Deploy scalable software | Week 2: A server app in a container\",\n  \"metaDescription\": \"Cloudbook becomes an Express app in a Docker image, built and deployed by the pipeline.\",\n  \"order\": 3\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h2\", null, \"Week 2: A server app in a container\"), mdx(\"p\", null, \"The static page gets a backend. You write a small Express server, package it as a container image, and let the pipeline build the image, store it in GitLab's registry and run it on your server. From here on, deploying means shipping a container.\"), mdx(\"p\", null, \"Pushing a tag builds an image and replaces the running container on your server.\"), mdx(\"h2\", null, \"Issues\"), mdx(\"p\", null, \"Work through the issues in order, in your own repository. Each one builds on the one before.\"), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Issue\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"What you do\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"express-server\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"An Express server with two JSON routes and an automated test.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"dockerize\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"A \", mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"Dockerfile\"), \" so the app runs the same on your computer and on the server.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"provision-docker\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Ansible installs Docker on the server, as it installed Caddy.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"deploy-container\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"CI builds and pushes the image, and the server pulls and runs it behind Caddy.\")))), mdx(\"p\", null, \"Write the week report in \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"report/week-2.md\"), \" after the last issue.\"), mdx(\"h2\", null, \"Slide decks\"), mdx(\"p\", null, \"Each deck is a self-study lecture of about 15\\u201320 minutes, except the intro, which takes about five.\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"../slides/deploy-scalable-software/week2-0-intro/slides.html\"\n  }, \"Week 2 intro\"), \": what the week asks of you\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"../slides/deploy-scalable-software/week2-1-containers/slides.html\"\n  }, \"Containers\"), \": images, containers, layers and registries\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"../slides/deploy-scalable-software/week2-2-config/slides.html\"\n  }, \"Configuration\"), \": environment variables and the twelve-factor idea\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"../slides/deploy-scalable-software/week2-3-deploy-container/slides.html\"\n  }, \"Deploying a container\"), \": building in CI, immutable infrastructure and what a release looks like\")), mdx(\"h2\", null, \"Reading material\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"docs/DOCKER.md\"), \" in your repo\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"https://docs.docker.com/\"\n  }, \"Docker documentation\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"https://docs.docker.com/reference/dockerfile/\"\n  }, \"Dockerfile reference\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"https://docs.gitlab.com/user/packages/container_registry/\"\n  }, \"GitLab Container Registry\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"https://12factor.net/config\"\n  }, \"The Twelve-Factor App, III. Config\"))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#week-2-a-server-app-in-a-container","title":"Week 2: A server app in a container"},{"url":"#issues","title":"Issues"},{"url":"#slide-decks","title":"Slide decks"},{"url":"#reading-material","title":"Reading material"}]},"parent":{"relativePath":"deploy-scalable-software/week-2.md"},"frontmatter":{"metaTitle":"2DV013 | Deploy scalable software | Week 2: A server app in a container","metaDescription":"Cloudbook becomes an Express app in a Docker image, built and deployed by the pipeline.","fullWidth":null}},"allMdx":{"edges":[{"node":{"fields":{"slug":"/deploy-scalable-software","title":"02 - Deploy scalable software"}}},{"node":{"fields":{"slug":"/deploy-scalable-software/assignment-2","title":"Assignment 2"}}},{"node":{"fields":{"slug":"/deploy-scalable-software/week-1","title":"Week 1: Provision and deploy a server"}}},{"node":{"fields":{"slug":"/","title":"Cloud Native Applications (2DV013)"}}},{"node":{"fields":{"slug":"/deploy-scalable-software/week-2","title":"Week 2: A server app in a container"}}},{"node":{"fields":{"slug":"/deploy-scalable-software/week-3","title":"Week 3: Databases and Compose"}}},{"node":{"fields":{"slug":"/group-project/assignment-3","title":"Assignment 3"}}},{"node":{"fields":{"slug":"/deploy-scalable-software/week-4","title":"Week 4: Kubernetes locally"}}},{"node":{"fields":{"slug":"/group-project/kravspec-egen","title":"Kravspec (egen)"}}},{"node":{"fields":{"slug":"/group-project/kravspec-standard","title":"Kravspec (standard)"}}},{"node":{"fields":{"slug":"/group-project/letter-to-customer","title":"Brev till företagskontakt"}}},{"node":{"fields":{"slug":"/group-project/week-12","title":"Course week 12: Project kick-off"}}},{"node":{"fields":{"slug":"/group-project/week-20","title":"Course week 20: Delivery and presentation"}}},{"node":{"fields":{"slug":"/deploy-scalable-software/week-5","title":"Week 5: A real cluster"}}},{"node":{"fields":{"slug":"/group-project","title":"03 - Group Project"}}},{"node":{"fields":{"slug":"/deploy-scalable-software/week-6","title":"Week 6: Release and wrap up"}}},{"node":{"fields":{"slug":"/infrastructure/assignment","title":"Assignment 1"}}},{"node":{"fields":{"slug":"/infrastructure/cloud","title":"University Cloud"}}},{"node":{"fields":{"slug":"/infrastructure","title":"01 - Infrastructure"}}},{"node":{"fields":{"slug":"/infrastructure/wsl","title":"WSL"}}},{"node":{"fields":{"slug":"/study-guide/communication","title":"Communication"}}},{"node":{"fields":{"slug":"/study-guide/exams","title":"Exams"}}},{"node":{"fields":{"slug":"/infrastructure/overview","title":"Overview"}}},{"node":{"fields":{"slug":"/study-guide/expectations","title":"Expectations"}}},{"node":{"fields":{"slug":"/study-guide","title":"Study Guide"}}},{"node":{"fields":{"slug":"/study-guide/instructors","title":"Instructors"}}},{"node":{"fields":{"slug":"/study-guide/readings","title":"Readings"}}},{"node":{"fields":{"slug":"/what-is-cloud-native","title":"0 - What is cloud native?"}}},{"node":{"fields":{"slug":"/what-is-cloud-native/overview","title":"Overview"}}},{"node":{"fields":{"slug":"/study-guide/registration","title":"Registration"}}}]}},"pageContext":{"id":"762ffd06-8f6d-50f0-a349-03345a2fe16f"}},
    "staticQueryHashes": ["253607798","3706406642","710574383"]}