diff --git a/challenges/001-docker-vps-deployment/DEPLOYMENT_GUIDE.md b/challenges/001-docker-vps-deployment/DEPLOYMENT_GUIDE.md new file mode 100644 index 0000000..76f098d --- /dev/null +++ b/challenges/001-docker-vps-deployment/DEPLOYMENT_GUIDE.md @@ -0,0 +1,103 @@ +Welcome to the Deployment Journey! +================================ + +Welcome to the Dockerize & Deploy Any Website challenge! + +Submission Deadline: You Have 2 Weeks! +------------------------------------------------- +You have until 12 July 2025 01:00 to work on your project and submit your final deployment. We encourage you to start early, utilize the provided resources, and ask questions in the support channel (archived-vps-docker-challenge or your project's support channel). + +Over the next two weeks, you'll transform your web application from local code to a live, internet-accessible site. This challenge is designed to build your skills in two powerful areas: Docker for consistent environments and a VPS for full control over your hosting. + +Your First Mission: Prepare Your Foundation! +-------------------------------------------- + +Choose Your Weapon: Decide which web application you'll be deploying. It can be a simple static HTML site, a Node.js backend, a Python Flask app, or anything you've built, just ensure it is running smoothly on your local machine. + +Understand Containerization: Begin by researching "What is Docker?" and "Why use Docker?". Think about the problem Docker solves. + +Stuck? Ask for help in the project's support channels. + +Milestone 1: Your App in a Box! +-------------------------------- + +Great job setting the stage! Now it's time to put your application into its very own isolated environment. + +Containerize Your Application! + +- Craft Your Blueprint: Research "Dockerfile best practices" for your application's language/framework (e.g., "Node.js (Express) Dockerfile", "Python Flask Dockerfile", "React or Vue site Dockerfile"). Your goal is to create a Dockerfile that tells Docker exactly how to build your application's image. +- Build Your Image: Learn how to use `docker build` to transform your Dockerfile into a portable Docker image on your local machine. +- Test Your Box: Use `docker run` to start your container and verify that your application is running correctly inside its container, accessible on a local port. + +Remember: Docker images are like packages, and containers are running instances of those packages. This step ensures your package is perfect before shipping! + +Milestone 2: Accessing Your Remote Playground +-------------------------------------------- + +Your app is now neatly packaged in a Docker image locally! Before we send it off, let's get your VPS ready to receive it. + +Secure Your VPS & Install Docker! + +1. Get Your Virtual Server: If you haven't already, provision a VPS. This will be your playground for deployment. +2. Connect Securely: Research "SSH access to VPS" and "SSH key authentication". Learn how to log into your VPS using your terminal and set up password-less, key-based authentication for enhanced security. +3. Initial Server Hygiene: Implement basic security steps (updates, create a non-root sudo user, disable direct root login). Research "Ubuntu server initial setup" if you're using an Ubuntu image. +4. Firewall First Line of Defense: Research "UFW firewall setup Ubuntu". Configure a basic firewall to only allow essential traffic (like SSH and, later, web traffic) to your server. +5. Bring Docker Aboard: Research "install Docker on Ubuntu 24.04 LTS" (or your chosen distro). Install Docker Engine on your VPS. + +Pro Tip: Every command you run on your VPS affects the live server. Double check before you hit Enter. + +Milestone 3: Your App, Live on the Server! +----------------------------------------- + +You've got your app containerized and your VPS ready. It's deployment time! + +Deploy & Run on VPS! + +- Code Transfer: Choose how you will get your Dockerfile and application code to the VPS, for example `scp`, `rsync`, or `git clone`. +- Build & Run Remotely: On the VPS, use `docker build` to create the image and `docker run` to start your application in a Docker container. +- Keep it Running: Ensure your Docker container runs continuously, even after server reboots. Research Docker restart policies (e.g., `--restart unless-stopped`). +- Verify Internally: Use `docker ps` and `docker logs` to confirm the container is running and healthy. + +Critical Thinking: Your application might be running on an internal port (e.g., 3000). Map that to a port on the VPS so your reverse proxy can access it. + +Milestone 4: Making Your Website Public & Secure! +------------------------------------------------ + +Your app is alive on the VPS, but how do people access it? And how do we make it secure? + +Nginx & SSL! The Web Gateway: + +1. Nginx as a Reverse Proxy: Research "Nginx as a reverse proxy for Docker". Install Nginx on your VPS. +2. Configure Routing: Create an Nginx configuration that listens on port 80 (HTTP) and forwards requests to the port your Docker container is mapped to (e.g., `localhost:8080`). +3. Open the Gates: Update your UFW firewall to allow HTTP (port 80) and HTTPS (port 443) traffic. +4. Connect Your Domain (Optional but Recommended): If you have a custom domain, add an A record pointing to your VPS IP address. +5. Secure with HTTPS: Research "Let's Encrypt Certbot Nginx". Install Certbot and use it to obtain and configure a free SSL certificate for your domain to enable HTTPS. + +Final Check: Visit your domain (or VPS IP if you don't have a domain) in your browser. Does your website load? Is it secure (HTTPS)? + +Final Call: Submission Time! +--------------------------- + +Final Reminder! This challenge is about Dockerizing and deploying any website to a VPS in 2 weeks. The final submission deadline is 12 July 2025 01:00. + +Your Final Mission: Submit Your Proof of Learning! + +Ensure you've covered all the requirements: + +- Your live website URL. +- Screenshots demonstrating your Docker container's health, Nginx config, and successful deployment. +- Your project code repository link (with Dockerfile). +- Your personal reflection on what you learned and how you overcame challenges. + +Submission link and support channels: Use the challenge's submission form and support channel to submit and ask for help. + +Project Sharing & Help Session +----------------------------- + +If you feel stuck, or want to share progress, join the community help session (check the challenge channels for dates and links). + +Additional resources: + +- Intro video on deploying with Docker and a VPS: https://www.youtube.com/watch?v=U8De7gavikI + +Good luck, we can't wait to see your deployed projects! diff --git a/challenges/001-docker-vps-deployment/README.md b/challenges/001-docker-vps-deployment/README.md index 61b94d4..90b3eef 100644 --- a/challenges/001-docker-vps-deployment/README.md +++ b/challenges/001-docker-vps-deployment/README.md @@ -1,71 +1,51 @@ -# Challenge 001: Docker & VPS Deployment +# Challenge: Dockerize & Deploy Any Website! -> The steps below are written to work with any VPS provider. +Welcome to the **"Dockerize & Deploy Any Website"** challenge. This is your opportunity to gain practical, real-world deployment skills by containerizing and deploying your own web application. -## Overview +## 🚀 The Challenge Goal +Our mission for the next two weeks is to learn to containerize any web application using Docker and deploy it to a Virtual Private Server (VPS). -Learn to containerize any web application with Docker and deploy it to a live, internet accessible server, complete with a reverse proxy and HTTPS. This challenge walks through the full deployment pipeline, from local development to a secured, production style setup. +This challenge covers the full deployment pipeline, from local development to a live, secure website. -## The Challenge Goal +## 💡 What You Will Learn +By the end of these two weeks, you'll be able to: -Containerize any web application you've built (or want to build) using Docker, and deploy it successfully to a Virtual Private Server (VPS). +- **Containerize applications with Docker:** Write a Dockerfile to package your app and its dependencies. +- **Manage a Virtual Private Server (VPS):** Use remote server access and basic Linux commands. +- **Deploy applications to the cloud:** Move your code from your machine to a live server. +- **Set up a web server as a reverse proxy:** Serve your Dockerized app to the internet. +- **Secure your website with SSL (HTTPS):** Obtain and configure free SSL certificates. -## What You Will Learn +## ⏳ Submission Deadline: You Have 2 Weeks! +You have until Saturday, 2 August 2025 00:45 to work on your project and submit your final deployment. Start early, use the available resources, and ask for support in the project's support channels. -By the end of this challenge, you'll be able to: +Submission form: https://dyno.gg/form/d813f991 -- Containerize applications with Docker, including writing a Dockerfile that packages an app and its dependencies. -- Manage a VPS, including remote access and basic Linux server administration. -- Deploy an application from a local machine to a live server. -- Configure a reverse proxy to serve a Dockerized app to the internet. -- Secure a website with a free SSL certificate (HTTPS). +## 🎉 How to 'Win' & Get Rewarded +This challenge is about learning. Every participant who completes the challenge is a winner. -## Milestones +To be entered into the prize raffle, you need to: -### Milestone 1: Containerize Your Application +1. Deploy a working Dockerized web application on a VPS. +2. Submit your Proof of Learning via the form above. Your submission must include: +- Your live website URL. +- Screenshots of your running Docker processes (`docker ps`), your web server configuration, and your deployment on the VPS. +- A link to your code repository (including your Dockerfile). +- A brief reflection on your learning, challenges, and your Docker setup. +- Your Discord username (not display name). -- Choose a web application to deploy. It can be a static site, a Node.js backend, a Python Flask app, or anything already running locally. -- Research Dockerfile best practices for your app's language or framework. -- Write a Dockerfile describing how to build your application's image. -- Build the image locally with `docker build`. -- Run and verify the container locally with `docker run`, confirming the app works as expected inside the container. +## 🏆 The Grand Prize +All eligible submissions will be entered into a raffle. Three winners will receive 1 month of Discord Nitro. -### Milestone 2: Prepare Your VPS +## 🤝 Support +We're here to help you: -- Provision a VPS from a hosting provider of your choice. -- Set up SSH access and configure key based authentication instead of password login. -- Perform basic server hardening: update the system, create a non root sudo user, and disable direct root login. -- Configure a firewall (e.g. UFW) to allow only necessary traffic. -- Install Docker Engine on the VPS. +- `archived-challenge-guides` contains tutorials and resources for the challenge. +- Use the community support channels to ask questions, share progress, and troubleshoot issues. -### Milestone 3: Deploy and Run on the VPS +## Good luck, and happy deploying! -- Transfer your Dockerfile and application code to the VPS (e.g. via `scp` or `git clone`). -- Build the Docker image on the server and run it as a container. -- Configure the container to restart automatically on failure or server reboot. -- Verify the container is running correctly using `docker ps` and `docker logs`. +## Winners (challenge complete) +The challenge has concluded and winners were selected. -### Milestone 4: Make It Public and Secure - -- Install a reverse proxy (e.g. Nginx or Caddy) on the VPS. -- Configure the reverse proxy to forward incoming traffic on port 80 to your container's mapped port. -- Update the firewall to allow HTTP (80) and HTTPS (443) traffic. -- Optional: point a custom domain at your VPS using a DNS A record. -- Secure the site with a free SSL certificate (e.g. via Let's Encrypt / Certbot). - -## What Counts as a Valid Submission - -Any project, existing or new, deployed and reachable through your VPS. This can be a static site, a full stack app, a bot with a web dashboard, or anything else with a network facing component. - -## Suggested Learning Areas - -- Basic Linux server administration -- SSH key based authentication -- Firewall configuration -- Reverse proxies -- Docker container lifecycle and restart policies -- DNS configuration and SSL certificates - -## Sharing Your Work - -Post your live URL, a short reflection on what you learned, and any issues you ran into in the community. Screenshots of your running container, reverse proxy config, or deployment process are welcome. \ No newline at end of file +Keep building and stay tuned for future events. \ No newline at end of file