Compare commits
27 Commits
2a22a3e027
...
1.3
| Author | SHA1 | Date | |
|---|---|---|---|
| eb28e41930 | |||
| 559ab4e2a8 | |||
| 4d1cfeadcd | |||
| 819f8b35b9 | |||
| 0e97468f7d | |||
| 9f9ee82c6b | |||
| e03dd0aaf7 | |||
| 525c6a47a6 | |||
| 5af898a702 | |||
| 7ee5437f8a | |||
| fa7af9d5c7 | |||
| 77ae65c2bd | |||
| 9a496c07b0 | |||
| 95911a210a | |||
| 9482ea3708 | |||
| 82d03aeb6a | |||
| 3f1c9841a2 | |||
| 9fdda7e2ba | |||
| 2e4028d623 | |||
| 5e6d63ef26 | |||
| 39ef5a4c49 | |||
| db9e1cd469 | |||
| b1726bba34 | |||
| 4ed6c18825 | |||
| 5ac8736004 | |||
| 36f3ab3bd1 | |||
| 4a1777d160 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,6 +5,7 @@
|
||||
/public/bundles/
|
||||
/var/
|
||||
/vendor/
|
||||
/migrations/
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
###> phpunit/phpunit ###
|
||||
|
||||
47
Dockerfile
47
Dockerfile
@@ -11,15 +11,13 @@ RUN apt update && \
|
||||
libjpeg-dev \
|
||||
libicu-dev \
|
||||
libpq-dev \
|
||||
libsqlite3-dev \
|
||||
sqlite3 \
|
||||
curl \
|
||||
git \
|
||||
cron \
|
||||
logrotate \
|
||||
nano
|
||||
|
||||
RUN service start cron
|
||||
RUN service enable cron
|
||||
|
||||
RUN docker-php-ext-configure gd --with-jpeg
|
||||
RUN docker-php-ext-configure zip
|
||||
@@ -33,7 +31,8 @@ RUN docker-php-ext-install \
|
||||
xml \
|
||||
intl \
|
||||
pdo_mysql \
|
||||
pdo_pgsql
|
||||
pdo_pgsql \
|
||||
pdo_sqlite
|
||||
|
||||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
|
||||
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
|
||||
@@ -42,38 +41,38 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" &&
|
||||
RUN curl -sS https://get.symfony.com/cli/installer | bash && \
|
||||
mv /root/.symfony5/bin/symfony /usr/local/bin/symfony
|
||||
|
||||
COPY . /var/www/html/
|
||||
ARG CACHEBURST=1
|
||||
ARG BRANCH=master
|
||||
|
||||
WORKDIR /var/www/html
|
||||
RUN git clone -b ${BRANCH} --single-branch https://gitea.rkprather.com/ryan/sermon-notes.git ./
|
||||
RUN git config --global --add safe.directory /var/www/html
|
||||
|
||||
RUN mv 000-default.conf /etc/apache2/sites-available/
|
||||
RUN rm /var/www/html/.env*
|
||||
RUN rm -rf /var/www/html/var/*
|
||||
RUN rm -rf /var/www/html/vendor
|
||||
RUN rm -rf /var/www/html/tests
|
||||
RUN rm -rf /var/www/html/translations
|
||||
|
||||
RUN echo "20 1 * * 6 root cd /var/www/html && /usr/local/bin/php bin/console app:get-audio > /var/log/sermon-notes.log 2>&1" > /etc/cron.d/get-audio
|
||||
RUN echo "20 1 * * 6 root cd /var/www/html && /usr/local/bin/php bin/console app:get-audio > /proc/1/fd/1 2>&1" > /etc/cron.d/get-audio
|
||||
RUN chmod 644 /etc/cron.d/get-audio
|
||||
|
||||
RUN echo "/var/log/sermon-notes.log {
|
||||
monthly
|
||||
rotate 12
|
||||
compress
|
||||
delaycompress
|
||||
missingok
|
||||
notifempty
|
||||
create 644 root root
|
||||
}" > /etc/logrotate.d/sermon-notes
|
||||
RUN crontab /etc/cron.d/get-audio
|
||||
|
||||
RUN COMPOSER_ALLOW_SUPERUSER=1 composer install --no-scripts --no-dev --optimize-autoloader
|
||||
RUN mkdir /data
|
||||
|
||||
RUN mkdir /var/www/html/var/cache
|
||||
RUN mkdir /var/www/html/var/log
|
||||
RUN mkdir -p /var/www/html/var/cache/prod
|
||||
RUN mkdir -p /var/www/html/var/log
|
||||
|
||||
RUN chown -R 33:33 /var/www/html /data
|
||||
RUN find /var/www/html -type d -exec chmod 755 '{}' \;
|
||||
RUN find /var/www/html -type f -exec chmod 644 '{}' \;
|
||||
RUN chmod 755 /data
|
||||
RUN chmod 644 /data/*
|
||||
RUN a2enmod rewrite setenvif headers
|
||||
|
||||
COPY prod.env /var/www/html/.env
|
||||
RUN /usr/local/bin/php bin/console importmap:install
|
||||
RUN /usr/local/bin/php bin/console asset-map:compile
|
||||
RUN rm /var/www/html/.env
|
||||
RUN chmod +x /var/www/html/bin/entrypoint.sh
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT ["/var/www/html/bin/entrypoint.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
@@ -28,11 +28,12 @@ This was my first publicly available docker container so I did not realize what
|
||||
5. [`compose.shared-db.yml`](https://gitea.rkprather.com/ryan/sermon-notes/raw/branch/main/docker/compose.shared-db.yml) - compose file with no database image because you are planning on using an existing database container or bare metal server
|
||||
4. Pull the image `docker pull gitea.rkprather.com/ryan/sermon-notes:latest`
|
||||
5. **NOTE: IF UPGRADING SKIP THIS STEP!!!** - Run the setup script, this will setup your .env file so that when you start the container everything will be where it is supposed to be.
|
||||
- `docker run --rm -it -v ${PWD}/.env:/var/www/html/.env gitea.rkprather.com/ryan/sermon-notes:latest /var/www/html/setup.php --{database-type} {--shared}`
|
||||
- `docker run --rm -it -v ${PWD}/.env:/var/www/html/.env gitea.rkprather.com/ryan/sermon-notes:latest php /var/www/html/setup.php --{database-type} {--shared}`
|
||||
- `{database-type}` = `sqlite`, `mysql`, `mariadb`, or `pgsql`
|
||||
- If you intend on this being connected to a shared database make sure that you specify `--shared`.
|
||||
6. Start the container with compose `docker compose up -d`
|
||||
7. **NOTE: IF UPGRADING SKIP THIS STEP!!!** Run `docker exec -it sermon-notes /var/www/html/install.php`. This will run the `php composer` to populate the database with all the desired reference material.
|
||||
7. **NOTE: IF UPGRADING SKIP THIS STEP!!!** Run `docker exec -it sermon-notes php /var/www/html/install.php`. This will run the `php composer` to populate the database with all the desired reference material.
|
||||
- NOTE: You will see deprecation warnings, you can ignore these
|
||||
8. Once complete you have a running system that you can navigate to in your browser with `http://{ip}:{port}`|`http://{hostname}:{port}`. Then you just need to register for an account. The first account that is created is made an admin so that you can access the `Reference Editor` and update any reference material if necessary.
|
||||
|
||||
## Operation
|
||||
|
||||
95
assets/css/fontawesome-all.min.css
vendored
95
assets/css/fontawesome-all.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
@import 'fontawesome-all.min.css';
|
||||
@import '../css/fontawesome-all.min.css';
|
||||
@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,600,400italic,600italic|Roboto+Slab:400,700");
|
||||
/*
|
||||
Editorial by HTML5 UP
|
||||
|
||||
8
bin/entrypoint.sh
Executable file
8
bin/entrypoint.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# Start the cron service in the background
|
||||
service cron start
|
||||
|
||||
chown -R www-data:www-data /var/www/html/var
|
||||
|
||||
# Execute the default Docker CMD (which starts Apache in the foreground)
|
||||
exec "$@"
|
||||
3660
composer.lock
generated
3660
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,22 +1,34 @@
|
||||
services:
|
||||
sermon-notes:
|
||||
image: gitea.rkprather.com/ryan/sermon-notes:latest
|
||||
image: gitea.rkprather.com/ryan/sermon-notes:1.3
|
||||
container_name: sermon-notes
|
||||
hostname: sermon-notes
|
||||
restart: unless-stopped
|
||||
|
||||
env_file: .env
|
||||
|
||||
ports:
|
||||
- ${HTTP_PORT}:80
|
||||
|
||||
volumes:
|
||||
- ${PWD}/.env:/var/www/html/.env
|
||||
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: mariadb
|
||||
image: mariadb:12.3
|
||||
container_name: db
|
||||
hostname: db
|
||||
restart: unless-stopped
|
||||
|
||||
env_file: .env
|
||||
|
||||
volumes:
|
||||
- ${PWD}/db_data:/var/lib/mysql
|
||||
|
||||
@@ -1,22 +1,34 @@
|
||||
services:
|
||||
sermon-notes:
|
||||
image: gitea.rkprather.com/ryan/sermon-notes:latest
|
||||
image: gitea.rkprather.com/ryan/sermon-notes:1.3
|
||||
container_name: sermon-notes
|
||||
hostname: sermon-notes
|
||||
restart: unless-stopped
|
||||
|
||||
env_file: .env
|
||||
|
||||
ports:
|
||||
- ${HTTP_PORT}:80
|
||||
|
||||
volumes:
|
||||
- ${PWD}/.env:/var/www/html/.env
|
||||
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: mysql
|
||||
image: mysql:9.6
|
||||
container_name: db
|
||||
hostname: db
|
||||
restart: unless-stopped
|
||||
|
||||
env_file: .env
|
||||
|
||||
volumes:
|
||||
- ${PWD}/db-data:/var/lib/mysql
|
||||
|
||||
@@ -1,14 +1,24 @@
|
||||
services:
|
||||
sermon-notes:
|
||||
container_name: sermon-notes
|
||||
image: gitea.rkprather.com/ryan/sermon-notes:latest
|
||||
image: gitea.rkprather.com/ryan/sermon-notes:1.3
|
||||
hostname: sermon-notes
|
||||
restart: unless-stopped
|
||||
|
||||
env_file: .env
|
||||
|
||||
ports:
|
||||
- ${HTTP_PORT}:80
|
||||
|
||||
volumes:
|
||||
- ${PWD}/.env:/var/www/html/.env
|
||||
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
@@ -17,7 +27,9 @@ services:
|
||||
container_name: db
|
||||
hostname: db
|
||||
restart: unless-stopped
|
||||
|
||||
env_file: .env
|
||||
|
||||
volumes:
|
||||
- ${PWD}/db-data:/var/lib/postgresql/data
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
services:
|
||||
sermon-notes:
|
||||
image: gitea.rkprather.com/ryan/sermon-notes:latest
|
||||
image: gitea.rkprather.com/ryan/sermon-notes:1.3
|
||||
container_name: sermon-notes
|
||||
hostname: sermon-notes
|
||||
restart: unless-stopped
|
||||
|
||||
env_file: .env
|
||||
|
||||
ports:
|
||||
- ${HTTP_PORT}:80
|
||||
|
||||
volumes:
|
||||
- ${PWD}/.env:/var/www/html/.env
|
||||
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
services:
|
||||
sermon-notes:
|
||||
image: gitea.rkprather.com/ryan/sermon-notes:latest
|
||||
image: gitea.rkprather.com/ryan/sermon-notes:1.3
|
||||
container_name: sermon-notes
|
||||
hostname: sermon-notes
|
||||
restart: unless-stopped
|
||||
|
||||
env_file: .env
|
||||
|
||||
ports:
|
||||
- ${HTTP_PORT}:80
|
||||
|
||||
volumes:
|
||||
- ${PWD}/data:/data
|
||||
- ${PWD}/.env:/var/www/html/.env
|
||||
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
52
install.php
52
install.php
@@ -1,28 +1,28 @@
|
||||
#!/usr/local/bin/php
|
||||
#!/usr/bin/env php
|
||||
|
||||
<?php
|
||||
|
||||
print "Updating packages and compiling assets".PHP_EOL;
|
||||
`COMPOSE_ALLOW_SUPERUSER=1 composer update`;
|
||||
`symfony console asset-map:compile`;
|
||||
shell_exec("COMPOSE_ALLOW_SUPERUSER=1 composer update");
|
||||
//`symfony console asset-map:compile");
|
||||
|
||||
print "Creating database schema".PHP_EOL;
|
||||
`symfony console doctrine:database:create`;
|
||||
shell_exec("symfony console doctrine:database:create --if-not-exists");
|
||||
|
||||
print "Updating migrations and setting permissions for data folder".PHP_EOL;
|
||||
`symfony console doctrine:migrations:migrate --no-interaction`;
|
||||
shell_exec("symfony console doctrine:schema:create");
|
||||
|
||||
`chown -R www-data:www-data /data`;
|
||||
shell_exec("chown -R www-data:www-data /data /var/www/html/var/cache");
|
||||
|
||||
// import reference material
|
||||
|
||||
print "Importing Bible and Eccumenical Creeds".PHP_EOL;
|
||||
`symfony console app:ingest-bible /var/www/html/references/esv-bible`;
|
||||
`symfony console app:import-ref /var/www/html/references/creeds/Apostles 'Apostles Creed' creed apc`;
|
||||
`symfony console app:import-ref /var/www/html/references/creeds/Athanasian 'Athanasian Creed' creed ath`;
|
||||
`symfony console app:import-ref /var/www/html/references/creeds/Chalcedon 'Definition of Chalcedon' creed dc`;
|
||||
`symfony console app:import-ref /var/www/html/references/creeds/French 'French Confession' creed fc`;
|
||||
`symfony console app:import-ref /var/www/html/references/creeds/Nicene 'Nicene Creed' creed nc`;
|
||||
shell_exec("symfony console app:ingest-bible /var/www/html/references/esv-bible");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/creeds/Apostles 'Apostles Creed' creed apc");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/creeds/Athanasian 'Athanasian Creed' creed ath");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/creeds/Chalcedon 'Definition of Chalcedon' creed dc");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/creeds/French 'French Confession' creed fc");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/creeds/Nicene 'Nicene Creed' creed nc");
|
||||
|
||||
$dutchStandards = (
|
||||
strtolower(
|
||||
@@ -32,9 +32,9 @@ $dutchStandards = (
|
||||
|
||||
if ($dutchStandards) {
|
||||
print "Importing Dutch Standards".PHP_EOL;
|
||||
`symfony console app:import-ref /var/www/html/references/bc Belgic belgic BC{\$ndx}`;
|
||||
`symfony console app:import-heidelberg`;
|
||||
`symfony console app:import-canons-of-dort`;
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/bc Belgic belgic BC{\$ndx}");
|
||||
shell_exec("symfony console app:import-heidelberg");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/cd Canons cd CD");
|
||||
}
|
||||
|
||||
$westminsterStandards = (
|
||||
@@ -45,9 +45,9 @@ $westminsterStandards = (
|
||||
|
||||
if ($westminsterStandards) {
|
||||
print "Importing Westminster Standards".PHP_EOL;
|
||||
`symfony console app:import-ref /var/www/html/references/wcf 'Westminster Confession' wcf WCF{\$ndx}`;
|
||||
`symfony console app:import-ref /var/www/html/references/wsc 'Westminster Shorter' wsc WSC{\$ndx}`;
|
||||
`symfony console app:import-wlc /var/www/html/references/wlc 'Westminster Larger' wlc WLC{\$ndx}`;
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/wcf 'Westminster Confession' wcf WCF{\$ndx}");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/wsc 'Westminster Shorter' wsc WSC{\$ndx}");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/wlc 'Westminster Larger' wlc WLC{\$ndx}");
|
||||
}
|
||||
|
||||
$helveticConfessions = (
|
||||
@@ -58,8 +58,8 @@ $helveticConfessions = (
|
||||
|
||||
if ($helveticConfessions) {
|
||||
print "Importing Helvitic standards".PHP_EOL;
|
||||
`symfony console app:import-ref /var/www/html/references/fhc 'First Helvetic Confession' 1hc 1HC{\$ndx}`;
|
||||
`symfony console app:import-ref /var/www/html/references/shc 'Second Helvetic Confession' 2hc 2HC{\$ndx}`;
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/fhc 'First Helvetic Confession' 1hc 1HC{\$ndx}");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/shc 'Second Helvetic Confession' 2hc 2HC{\$ndx}");
|
||||
}
|
||||
|
||||
$miscStandards = (
|
||||
@@ -70,12 +70,12 @@ $miscStandards = (
|
||||
|
||||
if ($miscStandards) {
|
||||
print "Importing misc standards".PHP_EOL;
|
||||
`symfony console app:import-ref /var/www/html/references/39a 'Thirty-Nine Articles' 39a 39A{\$ndx}`;
|
||||
`symfony console app:import-ref /var/www/html/references/ac 'Augsberg Confession' agc AGC{\$ndx}`;
|
||||
`symfony console app:import-ref /var/www/html/references/lbc 'London Baptist Confession' lbc LBC{\$ndx}`;
|
||||
`symfony console app:import-ref /var/www/html/references/lsc 'Luther\'s Small Catechism' lsc LSC`;
|
||||
`symfony console app:import-ref /var/www/html/references/llc 'Luther\'s Large Catechism' llc LLC`;
|
||||
`symfony console app:import-ref /var/www/html/references/sd 'Savoy Declaration' sd SD{\$ndx}`;
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/39a 'Thirty-Nine Articles' 39a 39A{\$ndx}");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/ac 'Augsberg Confession' agc AGC{\$ndx}");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/lbc 'London Baptist Confession' lbc LBC{\$ndx}");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/lsc 'Luther\'s Small Catechism' lsc LSC");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/llc 'Luther\'s Large Catechism' llc LLC");
|
||||
shell_exec("symfony console app:import-ref /var/www/html/references/sd 'Savoy Declaration' sd SD{\$ndx}");
|
||||
}
|
||||
|
||||
print "Sermon Notes Ready".PHP_EOL.PHP_EOL;
|
||||
|
||||
0
migrations/.gitignore
vendored
0
migrations/.gitignore
vendored
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240505234804 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE user (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, email VARCHAR(180) NOT NULL, roles CLOB NOT NULL --(DC2Type:json)
|
||||
, password VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL ON user (email)');
|
||||
$this->addSql('CREATE TABLE messenger_messages (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, body CLOB NOT NULL, headers CLOB NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
|
||||
, available_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
|
||||
, delivered_at DATETIME DEFAULT NULL --(DC2Type:datetime_immutable)
|
||||
)');
|
||||
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0 ON messenger_messages (queue_name)');
|
||||
$this->addSql('CREATE INDEX IDX_75EA56E0E3BD61CE ON messenger_messages (available_at)');
|
||||
$this->addSql('CREATE INDEX IDX_75EA56E016BA31DB ON messenger_messages (delivered_at)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP TABLE user');
|
||||
$this->addSql('DROP TABLE messenger_messages');
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240513011501 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE bible (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, book VARCHAR(255) NOT NULL, chapter INTEGER NOT NULL, verse INTEGER NOT NULL, content CLOB DEFAULT NULL, book_index INTEGER NOT NULL, label VARCHAR(20) DEFAULT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE TABLE note (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, speaker_id BLOB DEFAULT NULL --(DC2Type:uuid)
|
||||
, series_id BLOB DEFAULT NULL --(DC2Type:uuid)
|
||||
, user_id BLOB DEFAULT NULL --(DC2Type:uuid)
|
||||
, title VARCHAR(255) NOT NULL, date DATE NOT NULL, passage VARCHAR(255) NOT NULL, refs CLOB DEFAULT NULL --(DC2Type:json)
|
||||
, text CLOB DEFAULT NULL, PRIMARY KEY(id), CONSTRAINT FK_CFBDFA14D04A0F27 FOREIGN KEY (speaker_id) REFERENCES speaker (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_CFBDFA145278319C FOREIGN KEY (series_id) REFERENCES series (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_CFBDFA14A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||
$this->addSql('CREATE INDEX IDX_CFBDFA14D04A0F27 ON note (speaker_id)');
|
||||
$this->addSql('CREATE INDEX IDX_CFBDFA145278319C ON note (series_id)');
|
||||
$this->addSql('CREATE INDEX IDX_CFBDFA14A76ED395 ON note (user_id)');
|
||||
$this->addSql('CREATE TABLE reference (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, type VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, label VARCHAR(255) NOT NULL, ndx INTEGER NOT NULL, content CLOB DEFAULT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE TABLE series (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, user_id BLOB DEFAULT NULL --(DC2Type:uuid)
|
||||
, template_id BLOB DEFAULT NULL --(DC2Type:uuid)
|
||||
, name VARCHAR(255) NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_3A10012DA76ED395 FOREIGN KEY (user_id) REFERENCES user (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_3A10012D5DA0FB8 FOREIGN KEY (template_id) REFERENCES template (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||
$this->addSql('CREATE INDEX IDX_3A10012DA76ED395 ON series (user_id)');
|
||||
$this->addSql('CREATE INDEX IDX_3A10012D5DA0FB8 ON series (template_id)');
|
||||
$this->addSql('CREATE TABLE speaker (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, user_id BLOB DEFAULT NULL --(DC2Type:uuid)
|
||||
, name VARCHAR(255) NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_7B85DB61A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||
$this->addSql('CREATE INDEX IDX_7B85DB61A76ED395 ON speaker (user_id)');
|
||||
$this->addSql('CREATE TABLE template (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, user_id BLOB DEFAULT NULL --(DC2Type:uuid)
|
||||
, name VARCHAR(255) NOT NULL, content CLOB NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_97601F83A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||
$this->addSql('CREATE INDEX IDX_97601F83A76ED395 ON template (user_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP TABLE bible');
|
||||
$this->addSql('DROP TABLE note');
|
||||
$this->addSql('DROP TABLE reference');
|
||||
$this->addSql('DROP TABLE series');
|
||||
$this->addSql('DROP TABLE speaker');
|
||||
$this->addSql('DROP TABLE template');
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240513161129 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TEMPORARY TABLE __temp__reference AS SELECT id, type, name, label, ndx, content FROM reference');
|
||||
$this->addSql('DROP TABLE reference');
|
||||
$this->addSql('CREATE TABLE reference (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, type VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, label VARCHAR(255) NOT NULL, ndx INTEGER DEFAULT NULL, content CLOB DEFAULT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('INSERT INTO reference (id, type, name, label, ndx, content) SELECT id, type, name, label, ndx, content FROM __temp__reference');
|
||||
$this->addSql('DROP TABLE __temp__reference');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TEMPORARY TABLE __temp__reference AS SELECT id, type, name, label, ndx, content FROM reference');
|
||||
$this->addSql('DROP TABLE reference');
|
||||
$this->addSql('CREATE TABLE reference (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, type VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, label VARCHAR(255) NOT NULL, ndx INTEGER NOT NULL, content CLOB DEFAULT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('INSERT INTO reference (id, type, name, label, ndx, content) SELECT id, type, name, label, ndx, content FROM __temp__reference');
|
||||
$this->addSql('DROP TABLE __temp__reference');
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240527010736 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE note ADD COLUMN recording VARCHAR(255) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TEMPORARY TABLE __temp__note AS SELECT id, speaker_id, series_id, user_id, title, date, passage, refs, text FROM note');
|
||||
$this->addSql('DROP TABLE note');
|
||||
$this->addSql('CREATE TABLE note (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, speaker_id BLOB DEFAULT NULL --(DC2Type:uuid)
|
||||
, series_id BLOB DEFAULT NULL --(DC2Type:uuid)
|
||||
, user_id BLOB DEFAULT NULL --(DC2Type:uuid)
|
||||
, title VARCHAR(255) NOT NULL, date DATE NOT NULL, passage VARCHAR(255) NOT NULL, refs CLOB DEFAULT NULL --(DC2Type:json)
|
||||
, text CLOB DEFAULT NULL, PRIMARY KEY(id), CONSTRAINT FK_CFBDFA14D04A0F27 FOREIGN KEY (speaker_id) REFERENCES speaker (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_CFBDFA145278319C FOREIGN KEY (series_id) REFERENCES series (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_CFBDFA14A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||
$this->addSql('INSERT INTO note (id, speaker_id, series_id, user_id, title, date, passage, refs, text) SELECT id, speaker_id, series_id, user_id, title, date, passage, refs, text FROM __temp__note');
|
||||
$this->addSql('DROP TABLE __temp__note');
|
||||
$this->addSql('CREATE INDEX IDX_CFBDFA14D04A0F27 ON note (speaker_id)');
|
||||
$this->addSql('CREATE INDEX IDX_CFBDFA145278319C ON note (series_id)');
|
||||
$this->addSql('CREATE INDEX IDX_CFBDFA14A76ED395 ON note (user_id)');
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240622233923 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE user ADD COLUMN meta_data CLOB DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TEMPORARY TABLE __temp__user AS SELECT id, email, roles, password, name FROM user');
|
||||
$this->addSql('DROP TABLE user');
|
||||
$this->addSql('CREATE TABLE user (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, email VARCHAR(180) NOT NULL, roles CLOB NOT NULL --(DC2Type:json)
|
||||
, password VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('INSERT INTO user (id, email, roles, password, name) SELECT id, email, roles, password, name FROM __temp__user');
|
||||
$this->addSql('DROP TABLE __temp__user');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL ON user (email)');
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240717022017 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE shared_note (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, note_id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, owner_id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, shared_user_id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, PRIMARY KEY(id), CONSTRAINT FK_754B918C26ED0855 FOREIGN KEY (note_id) REFERENCES note (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||
$this->addSql('CREATE INDEX IDX_754B918C26ED0855 ON shared_note (note_id)');
|
||||
$this->addSql('CREATE TABLE shared_series (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, series_id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, owner_id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, shared_user_id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, PRIMARY KEY(id), CONSTRAINT FK_59E803195278319C FOREIGN KEY (series_id) REFERENCES series (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||
$this->addSql('CREATE INDEX IDX_59E803195278319C ON shared_series (series_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP TABLE shared_note');
|
||||
$this->addSql('DROP TABLE shared_series');
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20260114224910 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE user ADD COLUMN home_church_rss VARCHAR(255) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TEMPORARY TABLE __temp__user AS SELECT id, email, roles, password, name, meta_data FROM user');
|
||||
$this->addSql('DROP TABLE user');
|
||||
$this->addSql('CREATE TABLE user (id BLOB NOT NULL --(DC2Type:uuid)
|
||||
, email VARCHAR(180) NOT NULL, roles CLOB NOT NULL --(DC2Type:json)
|
||||
, password VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, meta_data CLOB DEFAULT NULL --(DC2Type:json)
|
||||
, PRIMARY KEY(id))');
|
||||
$this->addSql('INSERT INTO user (id, email, roles, password, name, meta_data) SELECT id, email, roles, password, name, meta_data FROM __temp__user');
|
||||
$this->addSql('DROP TABLE __temp__user');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL ON user (email)');
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20260217014215 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TEMPORARY TABLE __temp__messenger_messages AS SELECT id, body, headers, queue_name, created_at, available_at, delivered_at FROM messenger_messages');
|
||||
$this->addSql('DROP TABLE messenger_messages');
|
||||
$this->addSql('CREATE TABLE messenger_messages (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, body CLOB NOT NULL, headers CLOB NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
|
||||
, available_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
|
||||
, delivered_at DATETIME DEFAULT NULL --(DC2Type:datetime_immutable)
|
||||
)');
|
||||
$this->addSql('INSERT INTO messenger_messages (id, body, headers, queue_name, created_at, available_at, delivered_at) SELECT id, body, headers, queue_name, created_at, available_at, delivered_at FROM __temp__messenger_messages');
|
||||
$this->addSql('DROP TABLE __temp__messenger_messages');
|
||||
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0E3BD61CE16BA31DBBF396750 ON messenger_messages (queue_name, available_at, delivered_at, id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TEMPORARY TABLE __temp__messenger_messages AS SELECT id, body, headers, queue_name, created_at, available_at, delivered_at FROM messenger_messages');
|
||||
$this->addSql('DROP TABLE messenger_messages');
|
||||
$this->addSql('CREATE TABLE messenger_messages (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, body CLOB NOT NULL, headers CLOB NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
|
||||
, available_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
|
||||
, delivered_at DATETIME DEFAULT NULL --(DC2Type:datetime_immutable)
|
||||
)');
|
||||
$this->addSql('INSERT INTO messenger_messages (id, body, headers, queue_name, created_at, available_at, delivered_at) SELECT id, body, headers, queue_name, created_at, available_at, delivered_at FROM __temp__messenger_messages');
|
||||
$this->addSql('DROP TABLE __temp__messenger_messages');
|
||||
$this->addSql('CREATE INDEX IDX_75EA56E016BA31DB ON messenger_messages (delivered_at)');
|
||||
$this->addSql('CREATE INDEX IDX_75EA56E0E3BD61CE ON messenger_messages (available_at)');
|
||||
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0 ON messenger_messages (queue_name)');
|
||||
}
|
||||
}
|
||||
9
public/.htaccess
Normal file
9
public/.htaccess
Normal file
@@ -0,0 +1,9 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
Options -MultiViews
|
||||
RewriteEngine On
|
||||
|
||||
SetEnvIf X-Forwarded-Proto "https" HTTPS=on
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^(.*)$ index.php [QSA,L]
|
||||
</IfModule>
|
||||
BIN
public/images/Notes-icon-192x192.png
Normal file
BIN
public/images/Notes-icon-192x192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
BIN
public/images/Notes-icon-512x512.png
Normal file
BIN
public/images/Notes-icon-512x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 255 KiB |
35
public/manifest.json
Normal file
35
public/manifest.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "Sermon Notes",
|
||||
"short_name": "Sermon Notes",
|
||||
"description": "A personal note-taking app for sermons with reference material",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"orientation": "landscape",
|
||||
"background_color": "#ffffff",
|
||||
"theme_color": "#000000",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/images/Notes-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/images/Notes-icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"screenshots": [
|
||||
{
|
||||
"src": "/images/Notes-icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/images/Notes-icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"form_factor": "wide"
|
||||
}
|
||||
]
|
||||
}
|
||||
56
public/sw.js
Normal file
56
public/sw.js
Normal file
@@ -0,0 +1,56 @@
|
||||
// public/sw.js
|
||||
const CACHE_NAME = 'app-cache-v1';
|
||||
const ASSETS_TO_CACHE = [
|
||||
'/',
|
||||
'/manifest.json',
|
||||
// Add paths to your main CSS and JS files here
|
||||
// e.g., '/build/app.css', '/build/app.js'
|
||||
];
|
||||
|
||||
// Install Event: Cache core static assets
|
||||
self.addEventListener('install', event => {
|
||||
event.waitUntil(
|
||||
caches.open(CACHE_NAME)
|
||||
.then(cache => {
|
||||
return cache.addAll(ASSETS_TO_CACHE);
|
||||
})
|
||||
);
|
||||
self.skipWaiting();
|
||||
});
|
||||
|
||||
// Activate Event: Clean up old caches if you change the CACHE_NAME version
|
||||
self.addEventListener('activate', event => {
|
||||
event.waitUntil(
|
||||
caches.keys().then(cacheNames => {
|
||||
return Promise.all(
|
||||
cacheNames.map(cache => {
|
||||
if (cache !== CACHE_NAME) {
|
||||
return caches.delete(cache);
|
||||
}
|
||||
})
|
||||
);
|
||||
})
|
||||
);
|
||||
self.clients.claim();
|
||||
});
|
||||
|
||||
// Fetch Event: Network First, Fallback to Cache
|
||||
self.addEventListener('fetch', event => {
|
||||
// Only cache GET requests
|
||||
if (event.request.method !== 'GET') return;
|
||||
|
||||
event.respondWith(
|
||||
fetch(event.request)
|
||||
.then(networkResponse => {
|
||||
// If the network request succeeds, clone it and put it in the cache
|
||||
return caches.open(CACHE_NAME).then(cache => {
|
||||
cache.put(event.request, networkResponse.clone());
|
||||
return networkResponse;
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
// If the network fails (offline), try to serve from cache
|
||||
return caches.match(event.request);
|
||||
})
|
||||
);
|
||||
});
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/php
|
||||
#!/usr/bin/env php
|
||||
|
||||
<?php
|
||||
|
||||
@@ -8,7 +8,7 @@ if (!file_exists('/var/www/html/.env')) {
|
||||
|
||||
$cmd = getopt("", ["sqlite", "mysql", "mariadb", "pgsql", "shared"]);
|
||||
|
||||
$key = `openssl rand -base64 32 | tr -d '=' | tr -d '+' | tr -d '/' | tr -d ' '`;
|
||||
$key = shell_exec("openssl rand -base64 32 | tr -d '=' | tr -d '+' | tr -d '/' | tr -d ' '");
|
||||
$key = substr($key, 0, 32);
|
||||
$database_url = null;
|
||||
$getCreds = true;
|
||||
@@ -53,7 +53,7 @@ if ($getCreds) {
|
||||
$db_port = (isset($cmd['pgsql']) ? 5432 : 3306);
|
||||
$db_name = 'sermon_notes';
|
||||
$db_user = 'root';
|
||||
$pwd = `openssl rand -base64 32 | tr -d '=' | tr -d '+' | tr -d '/' | tr -d ' '`;
|
||||
$pwd = shell_exec("openssl rand -base64 32 | tr -d '=' | tr -d '+' | tr -d '/' | tr -d ' '");
|
||||
$db_password = substr($pwd, 0, 32);
|
||||
|
||||
if (isset($cmd['pgsql'])) {
|
||||
@@ -85,7 +85,7 @@ $output = <<<EOF
|
||||
APP_ENV=prod
|
||||
APP_DEBUG=0
|
||||
APP_SECRET=$key
|
||||
MESSAGENER_TRANSPORT_DSN=doctrine://default?auto_setup=0
|
||||
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
|
||||
HTTP_PORT=$http_port
|
||||
$creds$database_url
|
||||
|
||||
|
||||
@@ -144,6 +144,10 @@ class IngestReferenceCommand extends Command
|
||||
$ref->setContent($md);
|
||||
$ref->setName($this->name);
|
||||
$ref->setType($this->type);
|
||||
|
||||
if ($this->type == 'cd') {
|
||||
$label = substr(basename($file), 0, -3);
|
||||
}
|
||||
$ref->setLabel($label);
|
||||
|
||||
$this->io->success("Ingested {$this->name} as {$this->type}:{$label}");
|
||||
|
||||
@@ -133,6 +133,7 @@ class DefaultController extends AbstractController
|
||||
if (isset($classes[$step])) {
|
||||
$class = explode("\\", $classes[$step]);
|
||||
$className = end($class);
|
||||
|
||||
$func = "transfer{$className}Table";
|
||||
|
||||
if (method_exists($service, $func)) {
|
||||
@@ -145,10 +146,10 @@ class DefaultController extends AbstractController
|
||||
}
|
||||
|
||||
$progress = round((($step+1) / $totalClasses) * 100);
|
||||
$nextStep = ($step + 1 < $totalClasses) ? ($step + 1) : 'summary';
|
||||
$nextStep = (($step + 1) < $totalClasses) ? ($step + 1) : 'summary';
|
||||
|
||||
return $this->render('default/transfer_progress.html.twig', [
|
||||
'current' => $className,
|
||||
'current' => (isset($classes[$step+1]) ? end(explode("\\", $classes[$step+1])) : 'summary'),
|
||||
'progress' => $progress,
|
||||
'next_step' => $nextStep,
|
||||
]);
|
||||
|
||||
@@ -14,6 +14,7 @@ use Symfony\Component\Uid\Uuid;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
#[ORM\Entity(repositoryClass: UserRepository::class)]
|
||||
#[ORM\Table(name: 'app_user')]
|
||||
#[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_EMAIL', fields: ['email'])]
|
||||
class User implements UserInterface, PasswordAuthenticatedUserInterface, JsonSerializable
|
||||
{
|
||||
|
||||
33
symfony.lock
33
symfony.lock
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"doctrine/deprecations": {
|
||||
"version": "1.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "1.0",
|
||||
"ref": "87424683adc81d7dc305eefec1fced883084aab9"
|
||||
}
|
||||
},
|
||||
"doctrine/doctrine-bundle": {
|
||||
"version": "2.12",
|
||||
"recipe": {
|
||||
@@ -91,6 +100,18 @@
|
||||
".env"
|
||||
]
|
||||
},
|
||||
"symfony/form": {
|
||||
"version": "8.0",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "7.2",
|
||||
"ref": "7d86a6723f4a623f59e2bf966b6aad2fc461d36b"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/csrf.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/framework-bundle": {
|
||||
"version": "7.0",
|
||||
"recipe": {
|
||||
@@ -182,6 +203,18 @@
|
||||
"tests/bootstrap.php"
|
||||
]
|
||||
},
|
||||
"symfony/property-info": {
|
||||
"version": "8.0",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "7.3",
|
||||
"ref": "dae70df71978ae9226ae915ffd5fad817f5ca1f7"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/property_info.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/routing": {
|
||||
"version": "7.0",
|
||||
"recipe": {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||
<link rel='manifest' href='{{ asset('manifest.json') }}'>
|
||||
|
||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||
{% block stylesheets %}{% endblock %}
|
||||
@@ -15,5 +16,19 @@
|
||||
<body class='is-preload' onload='{% if onLoad is defined %}{{ onLoad }}{% endif %}'>
|
||||
{% block body %}{% endblock %}
|
||||
{% block javascripts %}{% endblock %}
|
||||
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/sw.js')
|
||||
.then(registration => {
|
||||
console.log('ServiceWorker registration successful with scope: ', registration.scope);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log('ServiceWorker registration failed: ', error);
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -181,7 +181,7 @@ let saveFailureCount = {{ meta.saveFailureCount }};
|
||||
<!-- The modal body -->
|
||||
<form id="emailForm" class="modal-body">
|
||||
<label for="shareEmail">Enter Friends Email:</label>
|
||||
<input type="email" id="shareEmail" name="email" required />
|
||||
<input type="email" id="shareEmail" name="email" autocomplete=false required />
|
||||
<button type='button' id="submit" class="btn btn-primary" onclick='shareNote()'>Submit</button>
|
||||
</form>
|
||||
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block stylesheets %}
|
||||
<link href="{{ asset('css/main.css') }}" rel="stylesheet" />
|
||||
<link href='{{ asset('css/jquery-ui.theme.css') }}' rel='stylesheet' />
|
||||
<link href='{{ asset('css/jquery-ui.structure.css') }}' rel='stylesheet' />
|
||||
<link href='{{ asset('styles/style.css') }}' rel='stylesheet' />
|
||||
<link href='//cdn.datatables.net/2.0.8/css/dataTables.dataTables.min.css' rel='stylesheet' />
|
||||
<style>
|
||||
button.button i {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
.input-error {
|
||||
border: solid 2px red !important;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
<script src="{{ asset('js/jquery.min.js') }}"></script>
|
||||
<script src='{{ asset('js/jquery-ui.js') }}'></script>
|
||||
<script src="{{ asset('js/browser.min.js') }}"></script>
|
||||
<script src="{{ asset('js/breakpoints.min.js') }}"></script>
|
||||
<script src="{{ asset('js/util.js') }}"></script>
|
||||
<script src="{{ asset('js/main.js') }}"></script>
|
||||
<script src='//momentjs.com/downloads/moment-with-locales.js'></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/markdown-it/13.0.2/markdown-it.min.js" integrity="sha512-ohlWmsCxOu0bph1om5eDL0jm/83eH09fvqLDhiEdiqfDeJbEvz4FSbeY0gLJSVJwQAp0laRhTXbUQG+ZUuifUQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src='//cdn.datatables.net/2.0.8/js/dataTables.min.js'></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container mt-5 text-center">
|
||||
<h2 class="text-success">Database Transfer Complete!</h2>
|
||||
|
||||
Reference in New Issue
Block a user