-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
063ac70
commit 8fea3f4
Showing
5 changed files
with
154 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
BuildArtifactory: | ||
name: Build Docker | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Artifactory | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ vars.JF_URL }} | ||
username: ${{ secrets.JFROG_USER_WRITER }} | ||
password: ${{ secrets.JFROG_PASSWORD_WRITER }} | ||
- name: Build and push Docker images | ||
uses: docker/[email protected] | ||
with: | ||
push: true | ||
tags: ${{ vars.REPO_URL }} | ||
|
||
BuildDockerHub: | ||
name: Build Docker | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push Docker images | ||
uses: docker/[email protected] | ||
with: | ||
push: true | ||
tags: personal-portfolio:latest | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
FROM nginx:1.27-alpine-perl | ||
FROM php:8.2-fpm-alpine | ||
|
||
COPY . /usr/share/nginx/html | ||
RUN apk --no-cache add nginx bash | ||
|
||
COPY ./nginx.conf /etc/nginx/nginx.conf | ||
|
||
COPY . /var/www/html | ||
|
||
EXPOSE 80 | ||
|
||
RUN chown -R www-data:www-data /var/www/html \ | ||
&& chmod -R 755 /var/www/html | ||
|
||
COPY ./startscript.sh /start.sh | ||
RUN chmod +x /start.sh | ||
|
||
CMD ["/start.sh"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
/** | ||
* Requires the "PHP Email Form" library | ||
* The "PHP Email Form" library is available only in the pro version of the template | ||
* The library should be uploaded to: vendor/php-email-form/php-email-form.php | ||
* For more info and help: https://bootstrapmade.com/php-email-form/ | ||
*/ | ||
|
||
// Replace [email protected] with your real receiving email address | ||
$receiving_email_address = '[email protected]'; | ||
|
||
if( file_exists($php_email_form = '../assets/vendor/php-email-form/php-email-form.php' )) { | ||
include( $php_email_form ); | ||
} else { | ||
die( 'Unable to load the "PHP Email Form" Library!'); | ||
} | ||
|
||
$contact = new PHP_Email_Form; | ||
$contact->ajax = true; | ||
|
||
$contact->to = $receiving_email_address; | ||
$contact->from_name = $_POST['name']; | ||
$contact->from_email = $_POST['email']; | ||
$contact->subject = $_POST['subject']; | ||
|
||
// Uncomment below code if you want to use SMTP to send emails. You need to enter your correct SMTP credentials | ||
/* | ||
$contact->smtp = array( | ||
'host' => 'example.com', | ||
'username' => 'example', | ||
'password' => 'pass', | ||
'port' => '587' | ||
); | ||
*/ | ||
|
||
$contact->add_message( $_POST['name'], 'From'); | ||
$contact->add_message( $_POST['email'], 'Email'); | ||
$contact->add_message( $_POST['message'], 'Message', 10); | ||
|
||
echo $contact->send(); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
worker_processes 1; | ||
events { worker_connections 1024; } | ||
|
||
http { | ||
include mime.types; | ||
default_type application/octet-stream; | ||
sendfile on; | ||
keepalive_timeout 65; | ||
|
||
server { | ||
listen 80; | ||
|
||
root /var/www/html; | ||
index index.php index.html; | ||
|
||
location / { | ||
try_files $uri $uri/ =404; | ||
} | ||
|
||
location ~ \.php$ { | ||
try_files $uri =404; | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
fastcgi_pass unix:/run/php/php8.2-fpm.sock; | ||
fastcgi_index index.php; | ||
include fastcgi_params; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
php-fpm -D | ||
|
||
nginx -g "daemon off;" |