Compare commits

..

2 Commits

Author SHA1 Message Date
a30f1528da Add files for production 2024-05-17 10:14:16 -04:00
415e6e44c7 remove .env 2024-05-17 13:29:26 +00:00
7 changed files with 154 additions and 39 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
###> symfony/framework-bundle ### ###> symfony/framework-bundle ###
/.env
/.env.local /.env.local
/.env.local.php /.env.local.php
/.env.*.local /.env.*.local

29
000-default.conf Normal file
View File

@ -0,0 +1,29 @@
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/public
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

50
Dockerfile Normal file
View File

@ -0,0 +1,50 @@
FROM php:8.2-apache
WORKDIR /var/www/html
RUN apt-get update && \
apt-get install -y \
libzip-dev \
unzip \
libonig-dev \
libxml2-dev \
libpng-dev \
libjpeg-dev \
libicu-dev \
sqlite3 \
curl \
git \
nano
RUN docker-php-ext-configure gd --with-jpeg && \
docker-php-ext-configure zip && \
docker-php-ext-install \
pdo_sqlite \
zip \
mbstring \
exif \
pcntl \
bcmath \
xml \
intl
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
php -r "unlink('composer-setup.php');"
RUN curl -sS https://get.symfony.com/cli/installer | bash && \
mv /root/.symfony5/bin/symfony /usr/local/bin/symfony
COPY 000-default.conf /etc/apache2/sites-available/
COPY composer.lock composer.json ./
RUN composer install --no-scripts --no-dev --optimize-autoloader
COPY . .
RUN bash install.sh
EXPOSE 80
CMD ["apache2-foreground"]

82
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "0d70d3365b484d441657610d2a288a25", "content-hash": "361fd73241c9895cbec28ddf0158d96c",
"packages": [ "packages": [
{ {
"name": "composer/semver", "name": "composer/semver",
@ -548,16 +548,16 @@
}, },
{ {
"name": "doctrine/doctrine-migrations-bundle", "name": "doctrine/doctrine-migrations-bundle",
"version": "3.3.0", "version": "3.3.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/DoctrineMigrationsBundle.git", "url": "https://github.com/doctrine/DoctrineMigrationsBundle.git",
"reference": "1dd42906a5fb9c5960723e2ebb45c68006493835" "reference": "715b62c31a5894afcb2b2cdbbc6607d7dd0580c0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/1dd42906a5fb9c5960723e2ebb45c68006493835", "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/715b62c31a5894afcb2b2cdbbc6607d7dd0580c0",
"reference": "1dd42906a5fb9c5960723e2ebb45c68006493835", "reference": "715b62c31a5894afcb2b2cdbbc6607d7dd0580c0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -568,6 +568,7 @@
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0" "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0"
}, },
"require-dev": { "require-dev": {
"composer/semver": "^3.0",
"doctrine/coding-standard": "^12", "doctrine/coding-standard": "^12",
"doctrine/orm": "^2.6 || ^3", "doctrine/orm": "^2.6 || ^3",
"doctrine/persistence": "^2.0 || ^3 ", "doctrine/persistence": "^2.0 || ^3 ",
@ -619,7 +620,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/doctrine/DoctrineMigrationsBundle/issues", "issues": "https://github.com/doctrine/DoctrineMigrationsBundle/issues",
"source": "https://github.com/doctrine/DoctrineMigrationsBundle/tree/3.3.0" "source": "https://github.com/doctrine/DoctrineMigrationsBundle/tree/3.3.1"
}, },
"funding": [ "funding": [
{ {
@ -635,7 +636,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-11-13T19:44:41+00:00" "time": "2024-05-14T20:32:18+00:00"
}, },
{ {
"name": "doctrine/event-manager", "name": "doctrine/event-manager",
@ -1256,23 +1257,26 @@
}, },
{ {
"name": "doctrine/sql-formatter", "name": "doctrine/sql-formatter",
"version": "1.2.0", "version": "1.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/sql-formatter.git", "url": "https://github.com/doctrine/sql-formatter.git",
"reference": "a321d114e0a18e6497f8a2cd6f890e000cc17ecc" "reference": "d1ac84aef745c69ea034929eb6d65a6908b675cc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/sql-formatter/zipball/a321d114e0a18e6497f8a2cd6f890e000cc17ecc", "url": "https://api.github.com/repos/doctrine/sql-formatter/zipball/d1ac84aef745c69ea034929eb6d65a6908b675cc",
"reference": "a321d114e0a18e6497f8a2cd6f890e000cc17ecc", "reference": "d1ac84aef745c69ea034929eb6d65a6908b675cc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.1 || ^8.0" "php": "^8.1"
}, },
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.4" "doctrine/coding-standard": "^12",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.5",
"vimeo/psalm": "^5.24"
}, },
"bin": [ "bin": [
"bin/sql-formatter" "bin/sql-formatter"
@ -1302,9 +1306,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/doctrine/sql-formatter/issues", "issues": "https://github.com/doctrine/sql-formatter/issues",
"source": "https://github.com/doctrine/sql-formatter/tree/1.2.0" "source": "https://github.com/doctrine/sql-formatter/tree/1.4.0"
}, },
"time": "2023-08-16T21:49:04+00:00" "time": "2024-05-08T08:12:09+00:00"
}, },
{ {
"name": "egulias/email-validator", "name": "egulias/email-validator",
@ -1651,16 +1655,16 @@
}, },
{ {
"name": "phpstan/phpdoc-parser", "name": "phpstan/phpdoc-parser",
"version": "1.28.0", "version": "1.29.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git", "url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb" "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/536889f2b340489d328f5ffb7b02bb6b183ddedc",
"reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1692,9 +1696,9 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types", "description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": { "support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues", "issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.28.0" "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.0"
}, },
"time": "2024-04-03T18:51:33+00:00" "time": "2024-05-06T12:04:23+00:00"
}, },
{ {
"name": "psr/cache", "name": "psr/cache",
@ -7391,16 +7395,16 @@
}, },
{ {
"name": "twig/extra-bundle", "name": "twig/extra-bundle",
"version": "v3.9.3", "version": "v3.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/twig-extra-bundle.git", "url": "https://github.com/twigphp/twig-extra-bundle.git",
"reference": "ef6869adf1fdab66f7e495771a7ba01496ffc0d5" "reference": "cdc6e23aeb7f4953c1039568c3439aab60c56454"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/twig-extra-bundle/zipball/ef6869adf1fdab66f7e495771a7ba01496ffc0d5", "url": "https://api.github.com/repos/twigphp/twig-extra-bundle/zipball/cdc6e23aeb7f4953c1039568c3439aab60c56454",
"reference": "ef6869adf1fdab66f7e495771a7ba01496ffc0d5", "reference": "cdc6e23aeb7f4953c1039568c3439aab60c56454",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7449,7 +7453,7 @@
"twig" "twig"
], ],
"support": { "support": {
"source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.9.3" "source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.10.0"
}, },
"funding": [ "funding": [
{ {
@ -7461,20 +7465,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-04-18T09:24:21+00:00" "time": "2024-05-11T07:35:57+00:00"
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v3.9.3", "version": "v3.10.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/Twig.git", "url": "https://github.com/twigphp/Twig.git",
"reference": "a842d75fed59cdbcbd3a3ad7fb9eb768fc350d58" "reference": "7aaed0b8311a557cc8c4047a71fd03153a00e755"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/a842d75fed59cdbcbd3a3ad7fb9eb768fc350d58", "url": "https://api.github.com/repos/twigphp/Twig/zipball/7aaed0b8311a557cc8c4047a71fd03153a00e755",
"reference": "a842d75fed59cdbcbd3a3ad7fb9eb768fc350d58", "reference": "7aaed0b8311a557cc8c4047a71fd03153a00e755",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7528,7 +7532,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/twigphp/Twig/issues", "issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.9.3" "source": "https://github.com/twigphp/Twig/tree/v3.10.2"
}, },
"funding": [ "funding": [
{ {
@ -7540,7 +7544,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-04-18T11:59:33+00:00" "time": "2024-05-14T06:04:16+00:00"
}, },
{ {
"name": "webmozart/assert", "name": "webmozart/assert",
@ -9565,16 +9569,16 @@
}, },
{ {
"name": "symfony/maker-bundle", "name": "symfony/maker-bundle",
"version": "v1.59.0", "version": "v1.59.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/maker-bundle.git", "url": "https://github.com/symfony/maker-bundle.git",
"reference": "1f02b59b98003b2c1f51bc8f178aee5cbf36779c" "reference": "b87b1b25c607a8a50832395bc751c784946a0350"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/maker-bundle/zipball/1f02b59b98003b2c1f51bc8f178aee5cbf36779c", "url": "https://api.github.com/repos/symfony/maker-bundle/zipball/b87b1b25c607a8a50832395bc751c784946a0350",
"reference": "1f02b59b98003b2c1f51bc8f178aee5cbf36779c", "reference": "b87b1b25c607a8a50832395bc751c784946a0350",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -9637,7 +9641,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/symfony/maker-bundle/issues", "issues": "https://github.com/symfony/maker-bundle/issues",
"source": "https://github.com/symfony/maker-bundle/tree/v1.59.0" "source": "https://github.com/symfony/maker-bundle/tree/v1.59.1"
}, },
"funding": [ "funding": [
{ {
@ -9653,7 +9657,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-04-27T21:12:25+00:00" "time": "2024-05-06T03:59:59+00:00"
}, },
{ {
"name": "symfony/phpunit-bridge", "name": "symfony/phpunit-bridge",

7
config/production.yml Normal file
View File

@ -0,0 +1,7 @@
# config/production.yml
framework:
name: sermon-notes
version: "1.0.0"
secret: "%kernel.secret%"
default_locale: "%locale%"

17
docker-compose.yml Normal file
View File

@ -0,0 +1,17 @@
version: "3"
services:
sermon-notes:
command: "php bin/console doctrine:migrations:migrate --no-interaction"
build: .
environment:
- APP_ENV=prod
- DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
- MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
# - DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app"
# - DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
# - DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
ports:
- "80:80"
volumes:
- .:/var/www/html

7
install.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
LENGTH=32
SECRET_KEY=$(openssl rand -base64 $LENGTH | tr -d '=' | tr -d '+' | tr -d '/' | tr -d ' ')
TRIMMED_KEY=$(cut -c1-32 <<< $SECRET_KEY)
echo "APP_SECRET=$TRIMMED_KEY" > .env.local