···11+# Use the official Node.js image as the base image
22+FROM node:18-alpine
33+44+# Set the working directory
55+WORKDIR /srv/www/ewancroft.uk
66+77+# Copy package.json and package-lock.json
88+COPY package*.json ./
99+1010+# Install dependencies
1111+RUN npm install
1212+1313+# Copy the rest of the application code
1414+COPY . .
1515+1616+# Expose the port the app runs on
1717+EXPOSE 3000
1818+1919+# Command to run the application
2020+CMD ["npm", "start"]
+84-1
README.md
···1313- **Customisable Layout:** The page layout features a left sidebar with profile info, navigation links, and pagination. The right column is dedicated to displaying posts.
1414- **Posts:** The site supports multiple post types, including text posts, image posts, and embedded content. Posts can be customised with rich media, such as images and embedded cards.
1515- **Profile Information:** The left sidebar includes a space for a profile picture, username, description, and external links.
1616-- **Mobile Optimisation:** The site is optimised for mobile browsing, with a responsive design that adjusts to different screen sises.
1616+- **Mobile Optimisation:** The site is optimised for mobile browsing, with a responsive design that adjusts to different screen sizes.
17171818For more details on customisation, refer to the documentation on WhiteWind [here](https://whtwnd.com/did:plc:xz3euvkhf44iadavovbsmqoo/3laxrz4dl4s2f).
19192020### Powered by atproto
21212222The site is powered by the [atproto platform](https://atproto.com), which enables decentralised content hosting. This allows you to integrate various platforms and manage your content seamlessly.
2323+2424+## Running the Site with Docker
2525+2626+To run the site using Docker Compose, follow these steps:
2727+2828+1. Build and start the Docker containers:
2929+3030+ ```sh
3131+ docker compose up --build -d
3232+ ```
3333+3434+This will build your Docker image and start the application inside a Docker container, making it accessible on port `3002`.
3535+3636+## Deploying with Cloudflare Tunnel
3737+3838+To deploy the site through a Cloudflare Tunnel, follow these steps:
3939+4040+### On macOS
4141+4242+1. Install the Cloudflare Tunnel client (`cloudflared`):
4343+4444+ ```sh
4545+ brew install cloudflare/cloudflare/cloudflared
4646+ ```
4747+4848+2. Authenticate `cloudflared` with your Cloudflare account:
4949+5050+ ```sh
5151+ cloudflared login
5252+ ```
5353+5454+3. Create a tunnel and give it a name:
5555+5656+ ```sh
5757+ cloudflared tunnel create my-tunnel
5858+ ```
5959+6060+4. Configure the tunnel to route traffic to your Docker container:
6161+6262+ ```sh
6363+ cloudflared tunnel route dns my-tunnel mywebsite.example.com
6464+ ```
6565+6666+5. Start the tunnel and route traffic to your local Docker container running on port `3002`:
6767+6868+ ```sh
6969+ cloudflared tunnel --url http://localhost:3002 run my-tunnel
7070+ ```
7171+7272+### On Ubuntu Server
7373+7474+1. Install the Cloudflare Tunnel client (`cloudflared`):
7575+7676+ ```sh
7777+ sudo apt-get update
7878+ sudo apt-get install -y wget
7979+ wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
8080+ sudo dpkg -i cloudflared-linux-amd64.deb
8181+ ```
8282+8383+2. Authenticate `cloudflared` with your Cloudflare account:
8484+8585+ ```sh
8686+ cloudflared login
8787+ ```
8888+8989+3. Create a tunnel and give it a name:
9090+9191+ ```sh
9292+ cloudflared tunnel create my-tunnel
9393+ ```
9494+9595+4. Configure the tunnel to route traffic to your Docker container:
9696+9797+ ```sh
9898+ cloudflared tunnel route dns my-tunnel mywebsite.example.com
9999+ ```
100100+101101+5. Start the tunnel and route traffic to your local Docker container running on port `3002`:
102102+103103+ ```sh
104104+ cloudflared tunnel --url http://localhost:3002 run my-tunnel
105105+ ```