Skip to content

Commit

Permalink
Moved to docker container for hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
umerfaruk committed May 27, 2024
1 parent f20c404 commit 1539e51
Show file tree
Hide file tree
Showing 230 changed files with 186,481 additions and 186,429 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.github
.parcel-cache
dist
node_modules
npm-debug.log
.editorconfig
44 changes: 44 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Docker Image CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Docker Login
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
29 changes: 29 additions & 0 deletions config/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
http {

include mime.types;

set_real_ip_from 0.0.0.0/0;
real_ip_recursive on;
real_ip_header X-Forward-For;
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s;

server {
listen 80;
server_name localhost;
root /proxy;
limit_req zone=mylimit burst=70 nodelay;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri /index.html;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}

events {}
8 changes: 8 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM nginx:alpine

COPY ./src/ /usr/share/nginx/html
COPY config/nginx/nginx.conf /etc/nginx/nginx.conf

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
29 changes: 0 additions & 29 deletions netlify.toml

This file was deleted.

File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@font-face {
font-family: 'NafeesWebNaskh';
src: url("./Nafees-Web-Naskh.eot");
src: url("./Nafees-Web-Naskh.eot") format("embedded-opentype"),
url("./Nafees-Web-Naskh.woff") format("woff"),
url("./Nafees-Web-Naskh.ttf") format("truetype"),
url("./Nafees-Web-Naskh.svg") format("svg");
unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
@font-face {
font-family: 'NafeesWebNaskh';
src: url("./Nafees-Web-Naskh.eot");
src: url("./Nafees-Web-Naskh.eot") format("embedded-opentype"),
url("./Nafees-Web-Naskh.woff") format("woff"),
url("./Nafees-Web-Naskh.ttf") format("truetype"),
url("./Nafees-Web-Naskh.svg") format("svg");
unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
}
File renamed without changes.
17,628 changes: 8,814 additions & 8,814 deletions adobe-arabic/AdobeArabic-Regular.svg → ...onts/adobe-arabic/AdobeArabic-Regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@font-face {
font-family: 'AdobeArabic';
src: url("./AdobeArabic-Regular.eot");
src: url("./AdobeArabic-Regular.eot") format("embedded-opentype"),
url("./AdobeArabic-Regular.woff") format("woff"),
url("./AdobeArabic-Regular.ttf") format("truetype"),
url("./AdobeArabic-Regular.svg") format("svg");
unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
@font-face {
font-family: 'AdobeArabic';
src: url("./AdobeArabic-Regular.eot");
src: url("./AdobeArabic-Regular.eot") format("embedded-opentype"),
url("./AdobeArabic-Regular.woff") format("woff"),
url("./AdobeArabic-Regular.ttf") format("truetype"),
url("./AdobeArabic-Regular.svg") format("svg");
unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
54,054 changes: 27,027 additions & 27,027 deletions amiri/Amiri-Bold.svg → src/fonts/amiri/Amiri-Bold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
52,162 changes: 26,081 additions & 26,081 deletions amiri/Amiri-BoldItalic.svg → src/fonts/amiri/Amiri-BoldItalic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
53,546 changes: 26,773 additions & 26,773 deletions amiri/Amiri-Italic.svg → src/fonts/amiri/Amiri-Italic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
53,894 changes: 26,947 additions & 26,947 deletions amiri/Amiri-Regular.svg → src/fonts/amiri/Amiri-Regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 1539e51

Please sign in to comment.