diff --git a/05-example-web-application/client-react/src/App.jsx b/05-example-web-application/client-react/src/App.jsx index ac7ea83e..0c0ecc99 100644 --- a/05-example-web-application/client-react/src/App.jsx +++ b/05-example-web-application/client-react/src/App.jsx @@ -36,7 +36,7 @@ function CurrentTime(props) { export function App() { return ( -

Hey Team! 👋

+

Hey Team from shipyard! 🚢

diff --git a/07-container-registries/Makefile b/07-container-registries/Makefile index 7e0500a3..ee13ca0b 100644 --- a/07-container-registries/Makefile +++ b/07-container-registries/Makefile @@ -6,18 +6,18 @@ build: # https://docs.docker.com/engine/reference/commandline/login/ .PHONY: push-dockerhub push-dockerhub: - docker tag my-scratch-image sidpalas/my-scratch-image # defaults to latest - docker push sidpalas/my-scratch-image + docker tag my-scratch-image megalodon25/my-scratch-image # defaults to latest + docker push megalodon25/my-scratch-image - docker tag my-scratch-image sidpalas/my-scratch-image:abc-123 - docker push sidpalas/my-scratch-image:abc-123 + docker tag my-scratch-image megalodon25/my-scratch-image:abc-123 + docker push megalodon25/my-scratch-image:abc-123 # Have to authenticate to ghcr.io first # https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry .PHONY: push-github-packages push-github-packages: - docker tag my-scratch-image ghcr.io/sidpalas/my-scratch-image # defaults to latest - docker push ghcr.io/sidpalas/my-scratch-image + docker tag my-scratch-image ghcr.io/megalodon25/my-scratch-image # defaults to latest + docker push ghcr.io/megalodon25/my-scratch-image - docker tag my-scratch-image ghcr.io/sidpalas/my-scratch-image:abc-123 # defaults to latest - docker push ghcr.io/sidpalas/my-scratch-image:abc-123 + docker tag my-scratch-image ghcr.io/megalodon25/my-scratch-image:abc-123 # defaults to latest + docker push ghcr.io/megalodon25/my-scratch-image:abc-123 diff --git a/08-running-containers/Makefile b/08-running-containers/Makefile index 580e4239..8a242371 100644 --- a/08-running-containers/Makefile +++ b/08-running-containers/Makefile @@ -59,7 +59,6 @@ docker-run-all: -e DATABASE_URL=${DATABASE_URL} \ -p 3000:3000 \ --restart unless-stopped \ - --link=db \ api-node docker run -d \ @@ -68,7 +67,6 @@ docker-run-all: -e DATABASE_URL=${DATABASE_URL} \ -p 8080:8080 \ --restart unless-stopped \ - --link=db \ api-golang docker run -d \ @@ -77,8 +75,6 @@ docker-run-all: -v ${PWD}/client-react/vite.config.js:/usr/src/app/vite.config.js \ -p 5173:5173 \ --restart unless-stopped \ - --link=api-node \ - --link=api-golang \ client-react-vite docker run -d \ @@ -86,8 +82,6 @@ docker-run-all: --network my-network \ -p 80:8080 \ --restart unless-stopped \ - --link=api-node \ - --link=api-golang \ client-react-ngnix .PHONY: docker-stop diff --git a/11-development-workflow/api-node/docker-compose-dev.yml b/11-development-workflow/api-node/docker-compose-dev.yml new file mode 100644 index 00000000..251008eb --- /dev/null +++ b/11-development-workflow/api-node/docker-compose-dev.yml @@ -0,0 +1,80 @@ +services: + client-react-vite: + image: client-react-vite + build: + context: ../05-example-web-application/client-react/ + dockerfile: ../../06-building-container-images/client-react/Dockerfile.3 + init: true + volumes: + - ./client-react/vite.config.js:/usr/src/app/vite.config.js + networks: + - frontend + ports: + - 5173:5173 + client-react-nginx: + labels: + shipyard.primary-route: true + shipyard.route: '/' + image: client-react-nginx + build: + context: ../05-example-web-application/client-react/ + dockerfile: ../../06-building-container-images/client-react/Dockerfile.5 + init: true + networks: + - frontend + ports: + - 80:8080 + restart: unless-stopped + api-node: + labels: + shipyard.route: '/api/node/' + shipyard.route.rewrite: true + image: api-node + build: + context: ../05-example-web-application/api-node/ + dockerfile: ../../06-building-container-images/api-node/Dockerfile.7 + init: true + depends_on: + - db + environment: + - DATABASE_URL=postgres://postgres:foobarbaz@db:5432/postgres + networks: + - frontend + - backend + ports: + - 3000:3000 + restart: unless-stopped + api-golang: + labels: + shipyard.route: '/api/golang/' + shipyard.route.rewrite: true + image: api-golang + build: + context: ../05-example-web-application/api-golang/ + dockerfile: ../../06-building-container-images/api-golang/Dockerfile.6 + init: true + depends_on: + - db + environment: + - DATABASE_URL=postgres://postgres:foobarbaz@db:5432/postgres + networks: + - frontend + - backend + ports: + - 8080:8080 + restart: unless-stopped + db: + image: postgres:15.1-alpine + volumes: + - pgdata:/var/lib/postgresql/data + environment: + - POSTGRES_PASSWORD=foobarbaz + networks: + - backend + ports: + - 5432:5432 +volumes: + pgdata: +networks: + frontend: + backend: diff --git a/README.md b/README.md index f8892512..d65889fd 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,16 @@ # DevOps Directive Docker Course -**NOTE:** The course video will be released to YouTube in Spring 2023! +This is the companion repo to: [Complete Docker Course - From BEGINNER to PRO! (Learn Containers)](https://youtu.be/RqTEHSBrYFw) -This is the companion repo to: `` - -`` +[![](./readme-assets/thumbnail.jpg)](https://youtu.be/RqTEHSBrYFw) ## Sponsor -[![](./readme-assets/shipyard-logo.png)](https://shipyard.build) +[![](./readme-assets/shipyard-logo.png)](https://shipyard.build/) -Thank you to Shipyard for sponsoring this course. It is because of their support that I am able to provide it to the community free of charge! +Thank you to [Shipyard](https://shipyard.build/) for sponsoring this course! It is because of their support that I am able to provide it to the community free of charge! -Shipyard is the easiest way to generate on demand ephemeral environments (aka a new environment for every pull request). Check them out at https://shipyard.build/! +Shipyard is the easiest way to generate on demand ephemeral environments (aka a new environment for every pull request). Sign up today at https://shipyard.social/DevOpsDirectivePromo! The first 300 people to use the promo code "DEVOPSDIRECTIVE" will receive an additional 30 days free on either their startup or business tier plans! ## [01 - History and Motivation](01-history-and-motivation/README.md) @@ -32,7 +30,7 @@ Before we build our own container images, we can familiarize ourselves with the ## [05 - Example Web Application](05-example-web-application/README.md) -Learning about containerization is interesting, but without a practical example it isn't very useful. In this section we create a 3 tier web application with a React front end client, two apis (node.js + golang), and a database. The application is as simple as possible while still providing a realistic microservice system to containerize. +Learning about containerization is interesting, but without a practical example it isn't very useful. In this section we create a 3 tier web application with a React front end client, two apis (node.js + golang), and a database. The application is as simple as possible while still providing a realistic microservice system to containerize. ## [06 - Building Container Images](06-building-container-images/README.md) diff --git a/readme-assets/shipyard-logo.png b/readme-assets/shipyard-logo.png index 1bad8131..ea2310de 100644 Binary files a/readme-assets/shipyard-logo.png and b/readme-assets/shipyard-logo.png differ diff --git a/readme-assets/thumbnail.jpg b/readme-assets/thumbnail.jpg new file mode 100644 index 00000000..83e8122b Binary files /dev/null and b/readme-assets/thumbnail.jpg differ