diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7d03456 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +.git +.gitignore +Dockerfile* +docker-compose.yaml +README.md +node_modules diff --git a/Dockerfile b/Dockerfile index 269c891..645d485 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,6 @@ -FROM nginx:alpine -COPY . /usr/share/nginx/html +FROM alpine:latest +RUN apk add --no-cache busybox-extras && mkdir -p /var/www +COPY . /var/www/ +WORKDIR /var/www EXPOSE 80 +CMD ["busybox-extras", "httpd", "-f", "-p", "80", "-h", "/var/www"] diff --git a/README.md b/README.md index f50cb0f..44e5c06 100644 --- a/README.md +++ b/README.md @@ -14,17 +14,22 @@ A static, bilingual (EN/AR), Apple-inspired marketing website for Ordenax — th | `styles.css` | Shared stylesheet, animations, responsive layout | | `app.js` | Bilingual i18n, RTL switching, scroll animations, mobile nav, form validation | -## Deploy to Coolify +## Deploy to Coolify (current setup) -1. Push this repository to your Git provider. -2. In Coolify, create a **Static Site** resource. -3. Select this repository and the branch you want to deploy. -4. Set the **Base Directory** to `/` (root). -5. Leave **Build Command** empty. -6. Set **Publish Directory** to `/` (root). -7. Deploy. +Deployment runs on Coolify as a **Docker image** resource built from this repository: -No build step is required. The site is pure HTML, CSS, and JavaScript. +1. Build and push the image to the Gitea container registry: + ```bash + docker login git.x0trader.com -u Aiman # token as password + docker build -t git.x0trader.com/aiman/ordenax-landing:latest . + docker push git.x0trader.com/aiman/ordenax-landing:latest + ``` +2. Coolify app `ordenax-landing` pulls `git.x0trader.com/aiman/ordenax-landing:latest` and serves it on port 80. +3. Live URL (auto-generated domain): `http://gcsqmj3tajthnnqud65adoep.187.127.225.190.sslip.io` + +To update the site: commit changes, rebuild + push the image, then redeploy the app in Coolify. + +> Note: the container uses BusyBox `httpd` (pure static serving, no build step). The site is pure HTML, CSS, and JavaScript. ## Local preview diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index 6cb65e0..0000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,16 +0,0 @@ -services: - landing: - image: nginx:alpine - build: - context: . - dockerfile: Dockerfile - container_name: ordenax-landing - restart: unless-stopped - expose: - - "80" - healthcheck: - test: ["CMD", "wget", "--spider", "-q", "http://localhost:80"] - interval: 15s - timeout: 5s - retries: 3 - start_period: 10s