Skip to content

Commit a3bca47

Browse files
committed
Create deployment action
1 parent 16ce3a3 commit a3bca47

File tree

10 files changed

+33
-131
lines changed

10 files changed

+33
-131
lines changed

.docker/nginx/Dockerfile

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

.docker/nginx/default.conf

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,15 @@
11
server {
22

33
# Set the port to listen on and the server name
4-
listen 80;
5-
listen [::]:80;
6-
server_name php.ug php.ug.lo;
4+
listen 80 default_server;
5+
listen [::]:80 default_server;
6+
server_name _;
77

8-
return 301 https://$server_name$request_uri;
9-
}
10-
11-
server {
12-
listen [::]:443 ssl;
13-
listen 443 ssl;
14-
server_name php.ug php.ug.lo;
15-
# Set the document root of the project
168
root /var/www/php.ug/public;
179

1810
# Set the directory index files
1911
index index.html index.php;
2012

21-
ssl_certificate /etc/nginx/ssl/php.ug.lo.crt;
22-
ssl_certificate_key /etc/nginx/ssl/php.ug.lo.key;
23-
24-
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
25-
ssl_ciphers HIGH:!aNULL:!MD5;
26-
2713
# Specify the default character set
2814
charset utf-8;
2915

@@ -58,7 +44,7 @@ server {
5844

5945
sendfile off;
6046

61-
client_max_body_size 100m;
47+
client_max_body_size 20m;
6248

6349
# Specify what happens what .ht files are requested
6450
location ~ /\.ht {

.docker/nginx/ssl/ca.crt

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

.docker/nginx/ssl/ca.key

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

.docker/nginx/ssl/php.ug.lo.ext

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

.docker/php/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
FROM php:8.4-fpm
21
LABEL authors="[email protected]"
2+
FROM php:8.4-fpm AS base
33

44
COPY --from=ghcr.io/php/pie:bin /pie /usr/bin/pie
55
COPY scripts /tmp
66
RUN bash -c "/tmp/php-build.sh"
77
RUN bash -c "/tmp/php-install-composer.sh"
88
RUN bash -c "/tmp/php-install-phive.sh"
99
WORKDIR "/var/www/php.ug"
10+
11+
FROM base AS prod
12+
13+
RUN rm /usr/bin/pie usr/local/bin/composer /usr/local/bin/phive
14+
COPY build /var/www/php.ug
15+

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
tests
2+
.justfiles
3+
.docker
4+
.editorconfig
5+
.gitattributes
6+
.gitignore
7+
Justfile

.github/workflows/build.yml

Whitespace-only changes.

.justfiles/build.Justfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Start the local instance
2+
[group("Build")]
3+
extract-php tag:
4+
docker compose exec php bash -c <<- DELIMITER
5+
rm -rf extract \
6+
mkdir extract \
7+
git archive --prefix=\"./\" --format=tar {{tag}} .| tar xv -C extract/ \
8+
find extract/ -type f -exec sed -i \"s/%release-tag%/:{{tag}}/\" {} \; \
9+
cd extract \
10+
composer install --no-dev --prefer-dist -a \
11+
cd .. \
12+
tar cvzf archive.tgz -C extract/ . \
13+
rm -rf extract \
14+
DELIMITER

Justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
export COMPOSE_BAKE := "true"
44

5+
import '.justfiles/build.Justfile'
56
import '.justfiles/docker.Justfile'
67
import '.justfiles/init.Justfile'
78

0 commit comments

Comments
 (0)