diff --git a/README.md b/README.md index fd655d1..f886219 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,19 @@ -# Welcome to [Slidev](https://github.com/slidevjs/slidev)! +# Demystifying Docker +This repo is a work in progress documenting my upcoming presentation for Scenic City Summit 2025. This repo is currently split into 2 parts. -To start the slide show: +## Slide Deck presentaiton +The slides folder contains my slide deck for the event. To view the presentation: -- `pnpm install` -- `pnpm dev` -- visit +```shell +cd slides +yarn +yarn dev +``` +Once everything is done it should open a browser window to http://localhost:3030. I am using [slidev](https://sli.dev) for the slide deck. All of the "slides" are in a single markdown file in the slides directory. -Edit the [slides.md](./slides.md) to see the changes. -Learn more about Slidev at the [documentation](https://sli.dev/). +## Code examples +The examples folder contains several Docker examples. + + +`examples/fullstack` is a basic example containing a backend NodeJS application with a React frontend as well as a Postgres Database. The project is set up so that you can do all development in dev containers. The `node_modules` folder for the backend is isolated from your host system and only exists inside the running container. For this reason, you will need to use a devcontainer in order to be able to get things like Intellisense and typings. \ No newline at end of file diff --git a/examples/fullstack/README.md b/examples/fullstack/README.md index 8554522..8160a32 100644 --- a/examples/fullstack/README.md +++ b/examples/fullstack/README.md @@ -14,7 +14,7 @@ cp backend/.env.example backend/.env docker compose up ``` -The first time you run `docker compose up` it may take a few minutes as Docker will need to build images for the frontend and backend. Also there are some database migrations and seed data that need to happen. Those are handled by `backend/dev-entrypoint.sh`. This is handled for you automatically since it is baked into the image. You will most likely need to run `sudo docker compose up` or add yourself to the privileged `docker` group (`sudo usermod -aG docker YOUR_USER`) in order for `Traefik` to bind to port 80. +The first time you run `docker compose up` it may take a few minutes as Docker will need to build images for the frontend and backend. Also there are some database migrations and seed data that need to happen. Those are handled by `backend/dev-entrypoint.sh`. This is handled for you automatically since it is baked into the image. Once everything is up you should be able to access the frontend at [http://app.docker.localhost:8888]() and the backend at [http://app.docker.localhost:8888/api]() ![](./homepage.png) diff --git a/examples/fullstack/backend/Dockerfile b/examples/fullstack/backend/Dockerfile index 1bde27a..af6181d 100644 --- a/examples/fullstack/backend/Dockerfile +++ b/examples/fullstack/backend/Dockerfile @@ -11,7 +11,6 @@ RUN npm ci FROM deps AS develop WORKDIR /app COPY dev-entrypoint.sh /entrypoint.sh -COPY .env.example /app/.env RUN chmod +x /entrypoint.sh RUN cat /entrypoint.sh ENV NODE_ENV=development diff --git a/slides/README.md b/slides/README.md new file mode 100644 index 0000000..fd655d1 --- /dev/null +++ b/slides/README.md @@ -0,0 +1,11 @@ +# Welcome to [Slidev](https://github.com/slidevjs/slidev)! + +To start the slide show: + +- `pnpm install` +- `pnpm dev` +- visit + +Edit the [slides.md](./slides.md) to see the changes. + +Learn more about Slidev at the [documentation](https://sli.dev/).