Skip to content

Commit 2fd680f

Browse files
authored
Merge pull request #3 from malisharfer/feature/deploy-to-web-app
Feature/deploy to web app
2 parents fcd4028 + d09338b commit 2fd680f

275 files changed

Lines changed: 23602 additions & 998 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bashrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+
17+
[docker-compose.yml]
18+
indent_size = 4

.env.example

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
APP_NAME=HolyShift
2+
APP_ENV=local
3+
APP_KEY=
4+
APP_DEBUG=true
5+
APP_TIMEZONE=UTC
6+
APP_URL=https://wa-newspace3.azurewebsites.net/
7+
APP_TIMEZONE=Asia/Jerusalem
8+
9+
APP_LOCALE=en
10+
APP_FALLBACK_LOCALE=en
11+
APP_FAKER_LOCALE=en_US
12+
13+
APP_MAINTENANCE_DRIVER=file
14+
APP_MAINTENANCE_STORE=database
15+
16+
BCRYPT_ROUNDS=12
17+
18+
LOG_CHANNEL=stack
19+
LOG_STACK=single
20+
LOG_DEPRECATIONS_CHANNEL=null
21+
LOG_LEVEL=debug
22+
23+
# DB_CONNECTION=sqlite
24+
# DB_HOST=127.0.0.1
25+
# DB_PORT=3306
26+
# DB_DATABASE=laravel
27+
# DB_USERNAME=root
28+
# DB_PASSWORD=
29+
30+
SESSION_DRIVER=database
31+
SESSION_LIFETIME=120
32+
SESSION_ENCRYPT=false
33+
SESSION_PATH=/
34+
SESSION_DOMAIN=null
35+
36+
BROADCAST_CONNECTION=log
37+
FILESYSTEM_DISK=local
38+
QUEUE_CONNECTION=database
39+
40+
CACHE_STORE=database
41+
CACHE_PREFIX=
42+
43+
MEMCACHED_HOST=127.0.0.1
44+
45+
REDIS_CLIENT=phpredis
46+
REDIS_HOST=127.0.0.1
47+
REDIS_PASSWORD=null
48+
REDIS_PORT=6379
49+
50+
MAIL_MAILER=log
51+
MAIL_HOST=127.0.0.1
52+
MAIL_PORT=2525
53+
MAIL_USERNAME=null
54+
MAIL_PASSWORD=null
55+
MAIL_ENCRYPTION=null
56+
MAIL_FROM_ADDRESS="hello@example.com"
57+
MAIL_FROM_NAME="${APP_NAME}"
58+
59+
AWS_ACCESS_KEY_ID=
60+
AWS_SECRET_ACCESS_KEY=
61+
AWS_DEFAULT_REGION=us-east-1
62+
AWS_BUCKET=
63+
AWS_USE_PATH_STYLE_ENDPOINT=false
64+
65+
VITE_APP_NAME="${APP_NAME}"

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* text=auto eol=lf
2+
3+
*.blade.php diff=html
4+
*.css diff=css
5+
*.html diff=html
6+
*.md diff=markdown
7+
*.php diff=php
8+
9+
/.github export-ignore
10+
CHANGELOG.md export-ignore
11+
.styleci.yml export-ignore
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: ⚙️ Build and deploy to ACR
2+
3+
on:
4+
push:
5+
branches:
6+
- feature/deploy-to-web-app
7+
8+
permissions:
9+
contents: read
10+
packages: write
11+
12+
jobs:
13+
build:
14+
name: Docker Build
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: 📁 Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: 🔧 Docker QEMU Setup
22+
uses: docker/setup-qemu-action@v3
23+
24+
- name: 🛠️ Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v3
26+
27+
- name: 🗝️ Login to Container Registry
28+
uses: azure/docker-login@v1
29+
with:
30+
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
31+
username: ${{ secrets.AZ_USERNAME }}
32+
password: ${{ secrets.AZ_PASSWORD }}
33+
34+
- name: 📃 Docker metadata
35+
id: meta
36+
uses: docker/metadata-action@v5
37+
with:
38+
images: ${{ secrets.REGISTRY_LOGIN_SERVER }}/new_image_2
39+
flavor: |
40+
latest=false
41+
tags: |
42+
type=raw,value=latest
43+
type=semver,pattern=v{{version}}
44+
type=semver,pattern=v{{major}}.{{minor}}
45+
46+
47+
- name: 🐳 Docker Build & Push
48+
uses: docker/build-push-action@v5
49+
id: docker_build
50+
with:
51+
context: ./
52+
push: true
53+
provenance: false
54+
labels: ${{ steps.meta.outputs.labels }}
55+
tags: ${{ steps.meta.outputs.tags }}
56+
file: ./Dockerfile
57+

.github/workflows/terraform.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/.phpunit.cache
2+
/node_modules
3+
/public/build
4+
/public/hot
5+
/public/storage
6+
/storage/*.key
7+
/vendor
8+
.env
9+
.env.backup
10+
.env.production
11+
.phpunit.result.cache
12+
Homestead.json
13+
Homestead.yaml
14+
auth.json
15+
npm-debug.log
16+
yarn-error.log
17+
/.fleet
18+
/.idea
19+
/.vscode
20+
21+
**/caddy
22+
frankenphp
23+
frankenphp-worker.php

.htaccess

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<IfModule mod_rewrite.c>
2+
RewriteEngine on
3+
RewriteCond %{REQUEST_URI} !^public
4+
RewriteRule ^$ public/ [L]
5+
RewriteRule ^(.*)$ public/$1 [L]
6+
</IfModule>

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-json
7+
- id: check-yaml
8+
- id: end-of-file-fixer
9+
- id: trailing-whitespace
10+
args:
11+
- --markdown-linebreak-ext=md
12+
13+
- repo: https://github.com/digitalpulp/pre-commit-php.git
14+
rev: 1.4.0
15+
hooks:
16+
- id: php-lint
17+
name: php lint

Dockerfile

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
ARG php_version=8.3
2+
3+
# FROM dunglas/frankenphp:1.1-php${php_version} AS base
4+
FROM dunglas/frankenphp:1.8-php8.3-bookworm AS base
5+
6+
WORKDIR /laravel
7+
SHELL ["/bin/bash", "-eou", "pipefail", "-c"]
8+
9+
ENV SERVER_NAME=:80
10+
ARG user=laravel
11+
12+
COPY ./ /laravel
13+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
14+
COPY --chmod=755 /entrypoint.sh entrypoint.sh
15+
COPY --chmod=755 /common common
16+
COPY --chown=${user}:${user} /artisan artisan
17+
COPY .env.example .env
18+
COPY /php.ini "${PHP_INI_DIR}/php.ini"
19+
RUN php --ini \
20+
&& php -r "echo 'max_execution_time: ' . ini_get('max_execution_time') . PHP_EOL;"
21+
22+
23+
RUN apt-get update \
24+
&& apt-get satisfy -y --no-install-recommends \
25+
"curl (>=7.88)" \
26+
"supervisor (>=4.2)" \
27+
"unzip (>=6.0)" \
28+
"vim-tiny (>=2)" \
29+
&& apt-get install -y nodejs npm \
30+
&& npm install -g npm@7 \
31+
&& apt-get clean \
32+
&& rm -rf /var/lib/apt/lists/*
33+
34+
RUN useradd \
35+
--uid 1000 \
36+
--shell /bin/bash \
37+
"${user}" \
38+
&& setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/frankenphp \
39+
&& chown -R "${user}:${user}" \
40+
/laravel \
41+
/data/caddy \
42+
/config/caddy \
43+
/var/{log,run} \
44+
&& chmod -R a+rw \
45+
/var/{log,run}
46+
47+
RUN install-php-extensions \
48+
bcmath \
49+
bz2 \
50+
curl \
51+
exif \
52+
gd \
53+
intl \
54+
pcntl \
55+
pdo_pgsql \
56+
mbstring \
57+
opcache \
58+
redis \
59+
sockets \
60+
calendar\
61+
zip
62+
63+
RUN composer install
64+
RUN npm install
65+
66+
USER ${user}
67+
68+
RUN chmod -R a+rw storage
69+
70+
ENTRYPOINT ["/laravel/entrypoint.sh"]

0 commit comments

Comments
 (0)