From 95dc89308ae816cbeb0628a315072395a676a1e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 11:52:06 +0100 Subject: [PATCH 01/37] ci: fix deployment for railway --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index eb6a8651..8ba8aced 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,8 +51,6 @@ RUN cat ./supervisord.conf >> /etc/supervisor/conf.d/supervisord.conf USER nobody -COPY --chown=nobody ./.env.prod ./.env - COPY --chown=nobody --from=dependencies /app/vendor ./vendor COPY --chown=nobody --from=assets /app/public ./public COPY --chown=nobody ./app ./app @@ -67,7 +65,6 @@ COPY --chown=nobody ./resources ./resources COPY --chown=nobody ./routes ./routes COPY --chown=nobody ./storage ./storage -RUN php artisan key:generate --force RUN php artisan storage:link RUN php artisan config:cache RUN php artisan event:cache From 04ec95ae2730a51ff65188ce2b531d5ab867594b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 14:42:49 +0100 Subject: [PATCH 02/37] feat: add search path to env variables --- config/database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database.php b/config/database.php index 137ad18c..8751af79 100644 --- a/config/database.php +++ b/config/database.php @@ -74,7 +74,7 @@ 'charset' => 'utf8', 'prefix' => '', 'prefix_indexes' => true, - 'search_path' => 'public', + 'search_path' => env('DB_SEARCH_PATH', 'public'), 'sslmode' => 'prefer', ], From 236ff80ff1b655fb2b4c53c7fd4f55621d9b3443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 14:51:39 +0100 Subject: [PATCH 03/37] ci: seed db on build --- entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 00000000..7c27a855 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +php artisan db:migrate --force --seed --no-interaction --isolated +/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf From d2b2980102903c0f57be9255934023b024da74ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 15:20:01 +0100 Subject: [PATCH 04/37] ci: add config as code for railway --- entrypoint.sh | 4 ---- seeder.railway.json | 9 +++++++++ website.railway.json | 10 ++++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) delete mode 100644 entrypoint.sh create mode 100644 seeder.railway.json create mode 100644 website.railway.json diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100644 index 7c27a855..00000000 --- a/entrypoint.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -php artisan db:migrate --force --seed --no-interaction --isolated -/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf diff --git a/seeder.railway.json b/seeder.railway.json new file mode 100644 index 00000000..4104206b --- /dev/null +++ b/seeder.railway.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://railway.app/railway.schema.json", + "build": { + "builder": "NIXPACKS" + }, + "deploy": { + "startCommand": "php artisan migrate --force --seed --no-interaction --isolated" + } +} diff --git a/website.railway.json b/website.railway.json new file mode 100644 index 00000000..5435980a --- /dev/null +++ b/website.railway.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://railway.app/railway.schema.json", + "build": { + "builder": "NIXPACKS" + }, + "deploy": { + "sleepApplication": true, + "startCommand": "php artisan serve" + } +} From 0c8473b6fc288244ebbbcc8489615da4ccd1c259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 15:39:54 +0100 Subject: [PATCH 05/37] chore: rename .env to .env.development --- .env => .env.development | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .env => .env.development (100%) diff --git a/.env b/.env.development similarity index 100% rename from .env rename to .env.development From e039a8b96221ed8a5adde597c71fcdc989ec8eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 15:45:32 +0100 Subject: [PATCH 06/37] ci: use pqsql for seed operation --- seeder.railway.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seeder.railway.json b/seeder.railway.json index 4104206b..9e9bb91a 100644 --- a/seeder.railway.json +++ b/seeder.railway.json @@ -4,6 +4,6 @@ "builder": "NIXPACKS" }, "deploy": { - "startCommand": "php artisan migrate --force --seed --no-interaction --isolated" + "startCommand": "php artisan migrate --force --seed --no-interaction --isolated --database=pgsql" } } From 6734f44f39a979b66d3deedafd65474b9c9195ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 16:15:12 +0100 Subject: [PATCH 07/37] wip --- seeder.railway.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seeder.railway.json b/seeder.railway.json index 9e9bb91a..d553bfa3 100644 --- a/seeder.railway.json +++ b/seeder.railway.json @@ -4,6 +4,6 @@ "builder": "NIXPACKS" }, "deploy": { - "startCommand": "php artisan migrate --force --seed --no-interaction --isolated --database=pgsql" + "startCommand": "sh -c 'php artisan migrate --force --seed --no-interaction --isolated'" } } From 0d68374652ad226e5919174bd9ab59854586e05d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 18:23:17 +0100 Subject: [PATCH 08/37] wip --- .dockerignore | 2 +- Dockerfile => Dockerfile.old | 0 docker-compose.yml | 2 +- dockerfiles/Dockerfile.seeder | 17 +++++++++ dockerfiles/Dockerfile.website | 70 ++++++++++++++++++++++++++++++++++ seeder.railway.json | 6 +-- website.railway.json | 6 +-- 7 files changed, 94 insertions(+), 9 deletions(-) rename Dockerfile => Dockerfile.old (100%) create mode 100644 dockerfiles/Dockerfile.seeder create mode 100644 dockerfiles/Dockerfile.website diff --git a/.dockerignore b/.dockerignore index 73f87237..7fc82ca7 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,4 @@ -bootstrap/cache/services.php +bootstrap/cache/* storage/app/* storage/framework/cache/* diff --git a/Dockerfile b/Dockerfile.old similarity index 100% rename from Dockerfile rename to Dockerfile.old diff --git a/docker-compose.yml b/docker-compose.yml index e701feec..e3d23651 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,7 @@ services: prod: build: context: . - dockerfile: Dockerfile + dockerfile: ./dockerfiles/Dockerfile.website target: production ports: - '80:80' diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder new file mode 100644 index 00000000..5a86ec5d --- /dev/null +++ b/dockerfiles/Dockerfile.seeder @@ -0,0 +1,17 @@ +# migrate +FROM composer:2 AS migrate +WORKDIR /app + +COPY composer.json composer.lock artisan ./ +RUN composer install --no-interaction --no-autoloader + +COPY app/ ./app/ +COPY bootstrap/ ./bootstrap/ +COPY config/ ./config/ +COPY database/ ./database/ +COPY resources/ ./resources/ +COPY routes/ ./routes/ +COPY public/ ./public/ +COPY storage/ ./storage/ + +CMD ["php", "artisan", "migrate", "-n", "--force"] diff --git a/dockerfiles/Dockerfile.website b/dockerfiles/Dockerfile.website new file mode 100644 index 00000000..63685ec2 --- /dev/null +++ b/dockerfiles/Dockerfile.website @@ -0,0 +1,70 @@ +# dev-dependencies +FROM composer:2 AS dev-dependencies +WORKDIR /app + +COPY composer.json composer.lock ./ +RUN composer install --no-interaction --no-autoloader + +# assets-build +FROM node:20-alpine AS assets-build +WORKDIR /app + +COPY package.json package-lock.json ./ +RUN npm install + +COPY ./resources/ ./resources +COPY ./vite.config.ts ./tsconfig.json ./tsconfig.app.json ./tsconfig.node.json ./tailwind.config.js ./postcss.config.js ./ +COPY --from=dev-dependencies /app/vendor ./vendor + +RUN npm run build + +# laravel-build +FROM composer:2 AS laravel-build +WORKDIR /app + +COPY composer.json composer.lock artisan ./ +COPY app/ ./app/ +COPY bootstrap/ ./bootstrap/ +COPY config/ ./config/ +COPY database/ ./database/ +COPY resources/ ./resources/ +COPY routes/ ./routes/ + +RUN composer install --no-interaction --optimize-autoloader --no-dev --prefer-dist + +# deploy +FROM trafex/php-nginx:3.4.0 AS deploy +WORKDIR /var/www/html + +USER root +RUN apk add --no-cache php82-pdo_pgsql php82-pgsql php82-pecl-redis php82-iconv php82-zip + +## Install supercronic (cron alternative) +ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.26/supercronic-linux-amd64 \ + SUPERCRONIC=supercronic-linux-amd64 \ + SUPERCRONIC_SHA1SUM=7a79496cf8ad899b99a719355d4db27422396735 + +RUN curl -fsSLO "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ + && chmod +x "$SUPERCRONIC" \ + && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ + && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic + +COPY ./etc/nginx/default.conf /etc/nginx/conf.d/default.conf +COPY ./etc/php/php.ini ${PHP_INI_DIR}/conf.d/php.ini +# COPY --chown=nobody ./etc/crontab ./crontab +COPY ./etc/supervisord.conf /etc/supervisor/conf.d/supervisord.conf + +USER nobody + +COPY --chown=nobody --from=laravel-build /app/ ./ +COPY --chown=nobody --from=assets-build /app/public/ ./public/ +COPY --chown=nobody public/ ./public/ +COPY --chown=nobody storage/ ./storage/ + +RUN php artisan storage:link -n +RUN php artisan config:cache -n +RUN php artisan event:cache -n +RUN php artisan route:cache -n +RUN php artisan view:cache -n +RUN php artisan optimize -n diff --git a/seeder.railway.json b/seeder.railway.json index d553bfa3..802b4471 100644 --- a/seeder.railway.json +++ b/seeder.railway.json @@ -1,9 +1,7 @@ { "$schema": "https://railway.app/railway.schema.json", "build": { - "builder": "NIXPACKS" - }, - "deploy": { - "startCommand": "sh -c 'php artisan migrate --force --seed --no-interaction --isolated'" + "builder": "DOCKERFILE", + "dockerfilePath": "./dockerfiles/Dockerfile.seeder" } } diff --git a/website.railway.json b/website.railway.json index 5435980a..f3341f43 100644 --- a/website.railway.json +++ b/website.railway.json @@ -1,10 +1,10 @@ { "$schema": "https://railway.app/railway.schema.json", "build": { - "builder": "NIXPACKS" + "builder": "DOCKERFILE", + "dockerfilePath": "./dockerfiles/Dockerfile.website" }, "deploy": { - "sleepApplication": true, - "startCommand": "php artisan serve" + "sleepApplication": true } } From d640830e2d3975b98bd7fcef0c4b8864aba8c570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 19:29:07 +0100 Subject: [PATCH 09/37] wip --- .env.railway.encrypted | 1 + .gitignore | 3 ++- dockerfiles/Dockerfile.website | 14 ++++++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .env.railway.encrypted diff --git a/.env.railway.encrypted b/.env.railway.encrypted new file mode 100644 index 00000000..b477b314 --- /dev/null +++ b/.env.railway.encrypted @@ -0,0 +1 @@ +eyJpdiI6IjNsY2RobUtBZEVNdFRHc01TaGF5MFE9PSIsInZhbHVlIjoiYlFWcDlVTEVpM1ZvQ1pJWHJQakRudUJpU2pqNFBZTWVDSTFteXliRVR5Yk5ZRUVwVFlZRDhKL1lERVVUU0J1S1FtWmRCUTZSM0FDU0N0VFQwYkdKcGlWazJrbjVXbXd2R1dWV3padEhBSzQ5QUxITFRiTk1qR1RZdkxrMVFHWjZNNC9uZ053eis3SkJTQVZ0QmFnTkNRblpDNXdEQS9OYVNaV09sOE40MlhrcWViVW9vOWtYK2hCUTlld29XSXJTN1EzU3BPaXI2L2hKNDhXQkdWaWFnbWY2d0ZuS0FFZjNlRDZ0WEp4aFBJRzV3dkkzTDBQV0kwQmhBTEJZWTFUYTZWYkpDMnowRUJ3UTRHaERxT1F4VG5JV3crZ00zNFRVOU1pay9vM3NGVytBZS9rMFlFbWJGMnhZd2J0VGcxeDNHcEg0SjZTWVdVQWJwMU1pSjQxMDcxRUdXUVJ0WW9ZaWlHd3U4bkZwckJSeW80SzVSZ0VuM25Ec0FGUjQ4aS9hNTBlL3Y5SzNLL2hMeFBLdnB5WUxMZitVMHZPRWVEajczN1JtNXRHckNMNjNHSSttUFhoYVNzdk9zemdLeXJWM3AwV1AwWklCNlc3Z0QvTzhiUWI4c0l4UFlrazhqMlptOFQ3djNlRmFsVlZscERWbE5TcEFBVE1kWmtmQStkUDBwVVJIOGQxSS9ZWjNvd2RWc1lDRzRNL2JVMU9GWmZOWWxobVYyd3pXNHdpM2wrRHBrVzhxSHdKekZ5SjB5NmtXMEhOdjZpWG9mU3VuUUhXOUt2MXJmNmNGcW5Hd0xXSUorUUhMMElVTDZJK3E1M3FITmhWUi8zbDc3R0tXQXNuYXUwZ2FRSEhXOW9Bclhzcm85YlQ1SUNZaXMyWkFiV1Q2SENoYkJleWlaaW5kdHgyZTlXNjlHUmdGOEFkQzF4RXJjQklUeEloZWE5ZENkcGs3Q28yWnhudG5jenNhRTdWMGtBYlZ1bGtTOEUza090OEFGdXhlYmhPSTRuSmw2WHFHd2w4b2NlbGlIOC9mVWxUYkEwUkVwMFJKaWtLWU5vd2NYcTNSZDhMOWZYRC94OWdTYm1NVXR6azdYaGM0SkhmMyIsIm1hYyI6IjY4Nzc1YjAwZDBiNTU3NGI3MzU5NWY3ZDA3YTllMjE2ZWZlNTc4NDUyMmRlZjgwYWMzODViODdjNWFhZWNiY2MiLCJ0YWciOiIifQ== \ No newline at end of file diff --git a/.gitignore b/.gitignore index 49613eb3..6d3dd272 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,8 @@ /storage/*.key /vendor .env.backup -.env.prod +.env.production +.env.railway .phpunit.result.cache Homestead.json Homestead.yaml diff --git a/dockerfiles/Dockerfile.website b/dockerfiles/Dockerfile.website index 63685ec2..9e5da6b1 100644 --- a/dockerfiles/Dockerfile.website +++ b/dockerfiles/Dockerfile.website @@ -57,14 +57,24 @@ COPY ./etc/supervisord.conf /etc/supervisor/conf.d/supervisord.conf USER nobody -COPY --chown=nobody --from=laravel-build /app/ ./ -COPY --chown=nobody --from=assets-build /app/public/ ./public/ +ARG LARAVEL_ENV=production +ARG LARAVEL_ENV_FILE=.env.${LARAVEL_ENV} +ARG LARAVEL_ENV_FILE_KEY="" + +COPY --chown=nobody ${LARAVEL_ENV_FILE} ./ COPY --chown=nobody public/ ./public/ COPY --chown=nobody storage/ ./storage/ +COPY --chown=nobody --from=laravel-build /app/ ./ +COPY --chown=nobody --from=assets-build /app/public/ ./public/ + +ENV APP_ENV=${LARAVEL_ENV} +RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} RUN php artisan storage:link -n RUN php artisan config:cache -n RUN php artisan event:cache -n RUN php artisan route:cache -n RUN php artisan view:cache -n RUN php artisan optimize -n + +RUN rm ${LARAVEL_ENV_FILE} From dcadb97ad9b2477ad9ddd5fd28006bff75a03a7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 19:30:30 +0100 Subject: [PATCH 10/37] wip --- dockerfiles/Dockerfile.seeder | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder index 5a86ec5d..7b56f756 100644 --- a/dockerfiles/Dockerfile.seeder +++ b/dockerfiles/Dockerfile.seeder @@ -5,6 +5,10 @@ WORKDIR /app COPY composer.json composer.lock artisan ./ RUN composer install --no-interaction --no-autoloader +ARG LARAVEL_ENV=production +ARG LARAVEL_ENV_FILE=.env.${LARAVEL_ENV} +ARG LARAVEL_ENV_FILE_KEY="" + COPY app/ ./app/ COPY bootstrap/ ./bootstrap/ COPY config/ ./config/ @@ -13,5 +17,10 @@ COPY resources/ ./resources/ COPY routes/ ./routes/ COPY public/ ./public/ COPY storage/ ./storage/ +COPY ${LARAVEL_ENV_FILE} ./ + +ENV APP_ENV=${LARAVEL_ENV} + +RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} CMD ["php", "artisan", "migrate", "-n", "--force"] From 7a11704822c9438023af7175e749353796e6a604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 19:30:53 +0100 Subject: [PATCH 11/37] wip --- dockerfiles/Dockerfile.seeder | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder index 7b56f756..1a744c28 100644 --- a/dockerfiles/Dockerfile.seeder +++ b/dockerfiles/Dockerfile.seeder @@ -9,6 +9,11 @@ ARG LARAVEL_ENV=production ARG LARAVEL_ENV_FILE=.env.${LARAVEL_ENV} ARG LARAVEL_ENV_FILE_KEY="" +ENV APP_ENV=${LARAVEL_ENV} + +COPY ${LARAVEL_ENV_FILE} ./ +RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} + COPY app/ ./app/ COPY bootstrap/ ./bootstrap/ COPY config/ ./config/ @@ -17,10 +22,5 @@ COPY resources/ ./resources/ COPY routes/ ./routes/ COPY public/ ./public/ COPY storage/ ./storage/ -COPY ${LARAVEL_ENV_FILE} ./ - -ENV APP_ENV=${LARAVEL_ENV} - -RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} CMD ["php", "artisan", "migrate", "-n", "--force"] From f9bf3cd22f61f891481b46ce01674269ccf1801f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 19:32:58 +0100 Subject: [PATCH 12/37] wip --- dockerfiles/Dockerfile.website | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dockerfiles/Dockerfile.website b/dockerfiles/Dockerfile.website index 9e5da6b1..e044bcac 100644 --- a/dockerfiles/Dockerfile.website +++ b/dockerfiles/Dockerfile.website @@ -53,7 +53,9 @@ RUN curl -fsSLO "$SUPERCRONIC_URL" \ COPY ./etc/nginx/default.conf /etc/nginx/conf.d/default.conf COPY ./etc/php/php.ini ${PHP_INI_DIR}/conf.d/php.ini # COPY --chown=nobody ./etc/crontab ./crontab -COPY ./etc/supervisord.conf /etc/supervisor/conf.d/supervisord.conf +COPY --chown=nobody ./etc/supervisord.conf ./supervisord.conf +RUN cat ./supervisord.conf >> /etc/supervisor/conf.d/supervisord.conf +RUN rm ./supervisord.conf USER nobody From e90ee4b78372c24f7223000cf7de0145740694ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 19:37:10 +0100 Subject: [PATCH 13/37] wip --- dockerfiles/Dockerfile.seeder | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder index 1a744c28..c2d391bc 100644 --- a/dockerfiles/Dockerfile.seeder +++ b/dockerfiles/Dockerfile.seeder @@ -3,7 +3,14 @@ FROM composer:2 AS migrate WORKDIR /app COPY composer.json composer.lock artisan ./ -RUN composer install --no-interaction --no-autoloader +COPY app/ ./app/ +COPY bootstrap/ ./bootstrap/ +COPY config/ ./config/ +COPY database/ ./database/ +COPY resources/ ./resources/ +COPY routes/ ./routes/ + +RUN composer install --no-interaction ARG LARAVEL_ENV=production ARG LARAVEL_ENV_FILE=.env.${LARAVEL_ENV} @@ -14,12 +21,6 @@ ENV APP_ENV=${LARAVEL_ENV} COPY ${LARAVEL_ENV_FILE} ./ RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} -COPY app/ ./app/ -COPY bootstrap/ ./bootstrap/ -COPY config/ ./config/ -COPY database/ ./database/ -COPY resources/ ./resources/ -COPY routes/ ./routes/ COPY public/ ./public/ COPY storage/ ./storage/ From 836e6dc3b0046abb63e14781ad86dfc7ce587913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 19:37:49 +0100 Subject: [PATCH 14/37] wip --- dockerfiles/Dockerfile.website | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/Dockerfile.website b/dockerfiles/Dockerfile.website index e044bcac..d5794cab 100644 --- a/dockerfiles/Dockerfile.website +++ b/dockerfiles/Dockerfile.website @@ -52,7 +52,7 @@ RUN curl -fsSLO "$SUPERCRONIC_URL" \ COPY ./etc/nginx/default.conf /etc/nginx/conf.d/default.conf COPY ./etc/php/php.ini ${PHP_INI_DIR}/conf.d/php.ini -# COPY --chown=nobody ./etc/crontab ./crontab +COPY --chown=nobody ./etc/crontab ./crontab COPY --chown=nobody ./etc/supervisord.conf ./supervisord.conf RUN cat ./supervisord.conf >> /etc/supervisor/conf.d/supervisord.conf RUN rm ./supervisord.conf From c42f30f2ca94f1b2f64077b86dd7516e3579f35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 19:40:58 +0100 Subject: [PATCH 15/37] wip --- dockerfiles/Dockerfile.seeder | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder index c2d391bc..65e6814d 100644 --- a/dockerfiles/Dockerfile.seeder +++ b/dockerfiles/Dockerfile.seeder @@ -2,6 +2,11 @@ FROM composer:2 AS migrate WORKDIR /app +USER root +RUN apk add --no-cache php82-pdo_pgsql php82-pgsql php82-pecl-redis php82-iconv php82-zip + +USER nobody + COPY composer.json composer.lock artisan ./ COPY app/ ./app/ COPY bootstrap/ ./bootstrap/ From 14a883c3124e003f1e4c1283063b6f616c9206a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 19:42:54 +0100 Subject: [PATCH 16/37] wip --- dockerfiles/Dockerfile.seeder | 3 --- 1 file changed, 3 deletions(-) diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder index 65e6814d..1dca0c67 100644 --- a/dockerfiles/Dockerfile.seeder +++ b/dockerfiles/Dockerfile.seeder @@ -2,11 +2,8 @@ FROM composer:2 AS migrate WORKDIR /app -USER root RUN apk add --no-cache php82-pdo_pgsql php82-pgsql php82-pecl-redis php82-iconv php82-zip -USER nobody - COPY composer.json composer.lock artisan ./ COPY app/ ./app/ COPY bootstrap/ ./bootstrap/ From 63d33f6c2f6c74a1ea34c1a3dfd93fd6fb2586a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 19:47:54 +0100 Subject: [PATCH 17/37] wip --- dockerfiles/Dockerfile.seeder | 1 + 1 file changed, 1 insertion(+) diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder index 1dca0c67..336c2896 100644 --- a/dockerfiles/Dockerfile.seeder +++ b/dockerfiles/Dockerfile.seeder @@ -3,6 +3,7 @@ FROM composer:2 AS migrate WORKDIR /app RUN apk add --no-cache php82-pdo_pgsql php82-pgsql php82-pecl-redis php82-iconv php82-zip +COPY ./etc/php/php.ini ${PHP_INI_DIR}/conf.d/php.ini COPY composer.json composer.lock artisan ./ COPY app/ ./app/ From 52fc4e13ba63005f66c591d9c43a55ca4bc5ba66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 19:48:51 +0100 Subject: [PATCH 18/37] wip --- dockerfiles/Dockerfile.seeder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder index 336c2896..556a7f94 100644 --- a/dockerfiles/Dockerfile.seeder +++ b/dockerfiles/Dockerfile.seeder @@ -2,7 +2,7 @@ FROM composer:2 AS migrate WORKDIR /app -RUN apk add --no-cache php82-pdo_pgsql php82-pgsql php82-pecl-redis php82-iconv php82-zip +RUN apk add --no-cache php83-pdo_pgsql php83-pgsql php83-pecl-redis php83-iconv php83-zip COPY ./etc/php/php.ini ${PHP_INI_DIR}/conf.d/php.ini COPY composer.json composer.lock artisan ./ From 3f104f6d7889b20e6b45d1ecaf76ab7ac1ca6f1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 20:38:46 +0100 Subject: [PATCH 19/37] wip --- dockerfiles/Dockerfile.seeder | 3 +-- dockerfiles/Dockerfile.website | 4 +--- etc/php/php.ini | 7 ------- 3 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 etc/php/php.ini diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder index 556a7f94..576db00c 100644 --- a/dockerfiles/Dockerfile.seeder +++ b/dockerfiles/Dockerfile.seeder @@ -2,8 +2,7 @@ FROM composer:2 AS migrate WORKDIR /app -RUN apk add --no-cache php83-pdo_pgsql php83-pgsql php83-pecl-redis php83-iconv php83-zip -COPY ./etc/php/php.ini ${PHP_INI_DIR}/conf.d/php.ini +RUN install-php-extensions pdo_pgsql pgsql redis iconv zip COPY composer.json composer.lock artisan ./ COPY app/ ./app/ diff --git a/dockerfiles/Dockerfile.website b/dockerfiles/Dockerfile.website index d5794cab..8e9e1fc4 100644 --- a/dockerfiles/Dockerfile.website +++ b/dockerfiles/Dockerfile.website @@ -37,7 +37,7 @@ FROM trafex/php-nginx:3.4.0 AS deploy WORKDIR /var/www/html USER root -RUN apk add --no-cache php82-pdo_pgsql php82-pgsql php82-pecl-redis php82-iconv php82-zip +RUN install-php-extensions pdo_pgsql pgsql redis iconv zip ## Install supercronic (cron alternative) ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.26/supercronic-linux-amd64 \ @@ -51,8 +51,6 @@ RUN curl -fsSLO "$SUPERCRONIC_URL" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic COPY ./etc/nginx/default.conf /etc/nginx/conf.d/default.conf -COPY ./etc/php/php.ini ${PHP_INI_DIR}/conf.d/php.ini -COPY --chown=nobody ./etc/crontab ./crontab COPY --chown=nobody ./etc/supervisord.conf ./supervisord.conf RUN cat ./supervisord.conf >> /etc/supervisor/conf.d/supervisord.conf RUN rm ./supervisord.conf diff --git a/etc/php/php.ini b/etc/php/php.ini deleted file mode 100644 index 11b7a939..00000000 --- a/etc/php/php.ini +++ /dev/null @@ -1,7 +0,0 @@ -[PHP] - -extension=pdo_pgsql -extension=pgsql -extension=redis -extension=iconv -extension=zip From 9db886241cb5bc9325dc55bba704dcf10dbd3ac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 20:41:50 +0100 Subject: [PATCH 20/37] wip --- dockerfiles/Dockerfile.website | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dockerfiles/Dockerfile.website b/dockerfiles/Dockerfile.website index 8e9e1fc4..fe046543 100644 --- a/dockerfiles/Dockerfile.website +++ b/dockerfiles/Dockerfile.website @@ -37,6 +37,8 @@ FROM trafex/php-nginx:3.4.0 AS deploy WORKDIR /var/www/html USER root + +ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN install-php-extensions pdo_pgsql pgsql redis iconv zip ## Install supercronic (cron alternative) From 0b85ba81ee9088e89c7fc245b3646c67af702ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 21:31:50 +0100 Subject: [PATCH 21/37] wip --- dockerfiles/Dockerfile.website | 8 ++++---- etc/nginx/default.conf | 1 - etc/php/php.ini | 7 +++++++ 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 etc/php/php.ini diff --git a/dockerfiles/Dockerfile.website b/dockerfiles/Dockerfile.website index fe046543..37f39d18 100644 --- a/dockerfiles/Dockerfile.website +++ b/dockerfiles/Dockerfile.website @@ -33,13 +33,11 @@ COPY routes/ ./routes/ RUN composer install --no-interaction --optimize-autoloader --no-dev --prefer-dist # deploy -FROM trafex/php-nginx:3.4.0 AS deploy +FROM trafex/php-nginx:3.6.0 AS deploy WORKDIR /var/www/html USER root - -ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN install-php-extensions pdo_pgsql pgsql redis iconv zip +RUN apk add --no-cache php83-pdo_pgsql php83-pgsql php83-pecl-redis php83-iconv php83-zip ## Install supercronic (cron alternative) ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.26/supercronic-linux-amd64 \ @@ -53,6 +51,8 @@ RUN curl -fsSLO "$SUPERCRONIC_URL" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic COPY ./etc/nginx/default.conf /etc/nginx/conf.d/default.conf +COPY ./etc/php/php.ini ${PHP_INI_DIR}/conf.d/php.ini +COPY --chown=nobody ./etc/crontab ./crontab COPY --chown=nobody ./etc/supervisord.conf ./supervisord.conf RUN cat ./supervisord.conf >> /etc/supervisor/conf.d/supervisord.conf RUN rm ./supervisord.conf diff --git a/etc/nginx/default.conf b/etc/nginx/default.conf index 0c48634b..b36d8871 100644 --- a/etc/nginx/default.conf +++ b/etc/nginx/default.conf @@ -1,7 +1,6 @@ server { listen 80; listen [::]:80; - server_name .sinf.pt; root /var/www/html/public; add_header X-Frame-Options "SAMEORIGIN"; diff --git a/etc/php/php.ini b/etc/php/php.ini new file mode 100644 index 00000000..11b7a939 --- /dev/null +++ b/etc/php/php.ini @@ -0,0 +1,7 @@ +[PHP] + +extension=pdo_pgsql +extension=pgsql +extension=redis +extension=iconv +extension=zip From aecca4c21e4023c22ea645b71c8029692bc4347b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 22:30:15 +0100 Subject: [PATCH 22/37] wip --- app/Console/Commands/CreateDbSchema.php | 37 +++++++++++++++++++++++++ config/database.php | 2 +- dockerfiles/Dockerfile.seeder | 2 +- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 app/Console/Commands/CreateDbSchema.php diff --git a/app/Console/Commands/CreateDbSchema.php b/app/Console/Commands/CreateDbSchema.php new file mode 100644 index 00000000..5dbfbc26 --- /dev/null +++ b/app/Console/Commands/CreateDbSchema.php @@ -0,0 +1,37 @@ + "public", + ]); + + $search_path = config('database.connections.pgsql.search_path'); + $conn->statement("CREATE SCHEMA IF NOT EXISTS $search_path"); + } +} diff --git a/config/database.php b/config/database.php index 8751af79..2439991d 100644 --- a/config/database.php +++ b/config/database.php @@ -74,7 +74,7 @@ 'charset' => 'utf8', 'prefix' => '', 'prefix_indexes' => true, - 'search_path' => env('DB_SEARCH_PATH', 'public'), + 'search_path' => str_replace('-', '_', env('DB_SEARCH_PATH', 'public')), 'sslmode' => 'prefer', ], diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder index 576db00c..57b58da2 100644 --- a/dockerfiles/Dockerfile.seeder +++ b/dockerfiles/Dockerfile.seeder @@ -26,4 +26,4 @@ RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || php artisan env:decrypt -n --env=${LARAV COPY public/ ./public/ COPY storage/ ./storage/ -CMD ["php", "artisan", "migrate", "-n", "--force"] +CMD [ "sh", "-c", "php artisan app:create-db-schema && php artisan migrate -n"] From 1c5cad759ed63e13d29940f79e8d2791d080d39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 22:38:43 +0100 Subject: [PATCH 23/37] wip --- seeder.railway.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/seeder.railway.json b/seeder.railway.json index 802b4471..ba1cdd40 100644 --- a/seeder.railway.json +++ b/seeder.railway.json @@ -3,5 +3,8 @@ "build": { "builder": "DOCKERFILE", "dockerfilePath": "./dockerfiles/Dockerfile.seeder" + }, + "deploy": { + "restartPolicyType": "NEVER" } } From a1624c0c79e595e17c685c4c9f63af900f81d3d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 23:03:42 +0100 Subject: [PATCH 24/37] wip --- dockerfiles/Dockerfile.seeder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder index 57b58da2..b09877f5 100644 --- a/dockerfiles/Dockerfile.seeder +++ b/dockerfiles/Dockerfile.seeder @@ -26,4 +26,4 @@ RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || php artisan env:decrypt -n --env=${LARAV COPY public/ ./public/ COPY storage/ ./storage/ -CMD [ "sh", "-c", "php artisan app:create-db-schema && php artisan migrate -n"] +CMD [ "sh", "-c", "php artisan app:create-db-schema && php artisan migrate --seed -n"] From 75ee286b79ab41dd95f35e89b6acb3d600bd8629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 23:08:07 +0100 Subject: [PATCH 25/37] wip --- composer.json | 1 + composer.lock | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 76 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 72b66580..cdbbe421 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,7 @@ "license": "MIT", "require": { "php": "^8.1", + "algolia/algoliasearch-client-php": "^3.4", "fedeisas/laravel-mail-css-inliner": "^5.2", "guzzlehttp/guzzle": "^7.2", "http-interop/http-factory-guzzle": "^1.2", diff --git a/composer.lock b/composer.lock index fbc96334..351ee1af 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,82 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2b82c023f971b5e7c11625ccb2a9cdd2", + "content-hash": "b229562fa7acdbbcf2be709444eb0ba0", "packages": [ + { + "name": "algolia/algoliasearch-client-php", + "version": "3.4.1", + "source": { + "type": "git", + "url": "https://github.com/algolia/algoliasearch-client-php.git", + "reference": "cf87b649f745479c0800299481d91dc303e23cea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/algolia/algoliasearch-client-php/zipball/cf87b649f745479c0800299481d91dc303e23cea", + "reference": "cf87b649f745479c0800299481d91dc303e23cea", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "php": "^7.3 || ^8.0", + "psr/http-message": "^1.1 || ^2.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.0", + "fzaninotto/faker": "^1.8", + "phpunit/phpunit": "^8.0 || ^9.0", + "symfony/yaml": "^2.0 || ^4.0" + }, + "suggest": { + "guzzlehttp/guzzle": "If you prefer to use Guzzle HTTP client instead of the Http Client implementation provided by the package" + }, + "bin": [ + "bin/algolia-doctor" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-2.0": "2.0.x-dev" + } + }, + "autoload": { + "files": [ + "src/Http/Psr7/functions.php", + "src/functions.php" + ], + "psr-4": { + "Algolia\\AlgoliaSearch\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Algolia Team", + "email": "contact@algolia.com" + } + ], + "description": "Algolia Search API Client for PHP", + "keywords": [ + "algolia", + "api", + "client", + "php", + "search" + ], + "support": { + "issues": "https://github.com/algolia/algoliasearch-client-php/issues", + "source": "https://github.com/algolia/algoliasearch-client-php/tree/3.4.1" + }, + "time": "2023-08-28T14:34:04+00:00" + }, { "name": "bacon/bacon-qr-code", "version": "2.0.8", From a8ce3689db4310ca6d4e6b6f74bb6ca370388b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Wed, 17 Jul 2024 23:09:59 +0100 Subject: [PATCH 26/37] wip --- composer.json | 1 - composer.lock | 76 +-------------------------------------------------- 2 files changed, 1 insertion(+), 76 deletions(-) diff --git a/composer.json b/composer.json index cdbbe421..72b66580 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,6 @@ "license": "MIT", "require": { "php": "^8.1", - "algolia/algoliasearch-client-php": "^3.4", "fedeisas/laravel-mail-css-inliner": "^5.2", "guzzlehttp/guzzle": "^7.2", "http-interop/http-factory-guzzle": "^1.2", diff --git a/composer.lock b/composer.lock index 351ee1af..fbc96334 100644 --- a/composer.lock +++ b/composer.lock @@ -4,82 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b229562fa7acdbbcf2be709444eb0ba0", + "content-hash": "2b82c023f971b5e7c11625ccb2a9cdd2", "packages": [ - { - "name": "algolia/algoliasearch-client-php", - "version": "3.4.1", - "source": { - "type": "git", - "url": "https://github.com/algolia/algoliasearch-client-php.git", - "reference": "cf87b649f745479c0800299481d91dc303e23cea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/algolia/algoliasearch-client-php/zipball/cf87b649f745479c0800299481d91dc303e23cea", - "reference": "cf87b649f745479c0800299481d91dc303e23cea", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "php": "^7.3 || ^8.0", - "psr/http-message": "^1.1 || ^2.0", - "psr/log": "^1.0 || ^2.0 || ^3.0", - "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.0", - "fzaninotto/faker": "^1.8", - "phpunit/phpunit": "^8.0 || ^9.0", - "symfony/yaml": "^2.0 || ^4.0" - }, - "suggest": { - "guzzlehttp/guzzle": "If you prefer to use Guzzle HTTP client instead of the Http Client implementation provided by the package" - }, - "bin": [ - "bin/algolia-doctor" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-2.0": "2.0.x-dev" - } - }, - "autoload": { - "files": [ - "src/Http/Psr7/functions.php", - "src/functions.php" - ], - "psr-4": { - "Algolia\\AlgoliaSearch\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Algolia Team", - "email": "contact@algolia.com" - } - ], - "description": "Algolia Search API Client for PHP", - "keywords": [ - "algolia", - "api", - "client", - "php", - "search" - ], - "support": { - "issues": "https://github.com/algolia/algoliasearch-client-php/issues", - "source": "https://github.com/algolia/algoliasearch-client-php/tree/3.4.1" - }, - "time": "2023-08-28T14:34:04+00:00" - }, { "name": "bacon/bacon-qr-code", "version": "2.0.8", From 16e168eee991287aaaf84637bbc0654628a54017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Fri, 19 Jul 2024 16:51:40 +0100 Subject: [PATCH 27/37] ci: wip --- .env.railway.encrypted | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.railway.encrypted b/.env.railway.encrypted index b477b314..ea042097 100644 --- a/.env.railway.encrypted +++ b/.env.railway.encrypted @@ -1 +1 @@ -eyJpdiI6IjNsY2RobUtBZEVNdFRHc01TaGF5MFE9PSIsInZhbHVlIjoiYlFWcDlVTEVpM1ZvQ1pJWHJQakRudUJpU2pqNFBZTWVDSTFteXliRVR5Yk5ZRUVwVFlZRDhKL1lERVVUU0J1S1FtWmRCUTZSM0FDU0N0VFQwYkdKcGlWazJrbjVXbXd2R1dWV3padEhBSzQ5QUxITFRiTk1qR1RZdkxrMVFHWjZNNC9uZ053eis3SkJTQVZ0QmFnTkNRblpDNXdEQS9OYVNaV09sOE40MlhrcWViVW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=C3=A9=20Lima?= Date: Fri, 19 Jul 2024 17:01:24 +0100 Subject: [PATCH 28/37] ci: wip --- dockerfiles/Dockerfile.seeder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder index b09877f5..57b58da2 100644 --- a/dockerfiles/Dockerfile.seeder +++ b/dockerfiles/Dockerfile.seeder @@ -26,4 +26,4 @@ RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || php artisan env:decrypt -n --env=${LARAV COPY public/ ./public/ COPY storage/ ./storage/ -CMD [ "sh", "-c", "php artisan app:create-db-schema && php artisan migrate --seed -n"] +CMD [ "sh", "-c", "php artisan app:create-db-schema && php artisan migrate -n"] From b2395b3a20093f2f196d8df160c1d59dcf6ea183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Fri, 19 Jul 2024 17:10:17 +0100 Subject: [PATCH 29/37] ci: wip --- dockerfiles/Dockerfile.seeder | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder index 57b58da2..e90ff9ce 100644 --- a/dockerfiles/Dockerfile.seeder +++ b/dockerfiles/Dockerfile.seeder @@ -1,9 +1,7 @@ -# migrate -FROM composer:2 AS migrate +# dependencies +FROM composer:2 AS dependencies WORKDIR /app -RUN install-php-extensions pdo_pgsql pgsql redis iconv zip - COPY composer.json composer.lock artisan ./ COPY app/ ./app/ COPY bootstrap/ ./bootstrap/ @@ -14,6 +12,14 @@ COPY routes/ ./routes/ RUN composer install --no-interaction +# migrate +FROM composer:2 AS migrate +WORKDIR /app + +RUN install-php-extensions pdo_pgsql pgsql redis iconv zip + +COPY --from=dependencies /app ./ + ARG LARAVEL_ENV=production ARG LARAVEL_ENV_FILE=.env.${LARAVEL_ENV} ARG LARAVEL_ENV_FILE_KEY="" @@ -26,4 +32,4 @@ RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || php artisan env:decrypt -n --env=${LARAV COPY public/ ./public/ COPY storage/ ./storage/ -CMD [ "sh", "-c", "php artisan app:create-db-schema && php artisan migrate -n"] +CMD [ "php", "artisan", "migrate", "-n"] From 0c7cf4123cde4f9265618551c8481b576e8f210d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Fri, 19 Jul 2024 17:12:46 +0100 Subject: [PATCH 30/37] ci: wip --- seeder.railway.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seeder.railway.json b/seeder.railway.json index ba1cdd40..82aa961a 100644 --- a/seeder.railway.json +++ b/seeder.railway.json @@ -5,6 +5,7 @@ "dockerfilePath": "./dockerfiles/Dockerfile.seeder" }, "deploy": { - "restartPolicyType": "NEVER" + "restartPolicyType": "NEVER", + "sleepApplication": false } } From 8371683a5ad8f463c2877f487e6f6448105d6da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Fri, 19 Jul 2024 18:46:14 +0100 Subject: [PATCH 31/37] ci: wip --- docker-compose.yml | 11 +++++++---- dockerfiles/Dockerfile.website | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e3d23651..5e04229b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,7 +31,10 @@ services: build: context: . dockerfile: ./dockerfiles/Dockerfile.website - target: production + target: deploy + args: + - LARAVEL_ENV=development + - LARAVEL_ENV_FILE=.env.development ports: - '80:80' networks: @@ -41,14 +44,14 @@ services: - redis - meilisearch pgsql: - image: 'postgres:15' + image: 'postgres:16' ports: - '${FORWARD_DB_PORT:-5432}:5432' environment: - PGPASSWORD: '${DB_PASSWORD:-secret}' + PGPASSWORD: '${DB_PASSWORD}' POSTGRES_DB: '${DB_DATABASE}' POSTGRES_USER: '${DB_USERNAME}' - POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}' + POSTGRES_PASSWORD: '${DB_PASSWORD}' volumes: - 'sail-pgsql:/var/lib/postgresql/data' - './vendor/laravel/sail/database/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql' diff --git a/dockerfiles/Dockerfile.website b/dockerfiles/Dockerfile.website index 37f39d18..9034eed5 100644 --- a/dockerfiles/Dockerfile.website +++ b/dockerfiles/Dockerfile.website @@ -63,7 +63,7 @@ ARG LARAVEL_ENV=production ARG LARAVEL_ENV_FILE=.env.${LARAVEL_ENV} ARG LARAVEL_ENV_FILE_KEY="" -COPY --chown=nobody ${LARAVEL_ENV_FILE} ./ +COPY --chown=nobody ${LARAVEL_ENV_FILE} ./.env.${LARAVEL_ENV} COPY --chown=nobody public/ ./public/ COPY --chown=nobody storage/ ./storage/ COPY --chown=nobody --from=laravel-build /app/ ./ @@ -71,7 +71,7 @@ COPY --chown=nobody --from=assets-build /app/public/ ./public/ ENV APP_ENV=${LARAVEL_ENV} -RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} +RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || ( mv ./.env.${LARAVEL_ENV} ./.env.${LARAVEL_ENV}.encrypted && php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} ) RUN php artisan storage:link -n RUN php artisan config:cache -n RUN php artisan event:cache -n From ed0fff90c0308c0508902ddc8843f8e239d98d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Fri, 19 Jul 2024 18:47:43 +0100 Subject: [PATCH 32/37] ci: wip --- dockerfiles/Dockerfile.website | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerfiles/Dockerfile.website b/dockerfiles/Dockerfile.website index 9034eed5..67eb30df 100644 --- a/dockerfiles/Dockerfile.website +++ b/dockerfiles/Dockerfile.website @@ -71,7 +71,7 @@ COPY --chown=nobody --from=assets-build /app/public/ ./public/ ENV APP_ENV=${LARAVEL_ENV} -RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || ( mv ./.env.${LARAVEL_ENV} ./.env.${LARAVEL_ENV}.encrypted && php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} ) +RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || ( mv .env.${LARAVEL_ENV} .env.${LARAVEL_ENV}.encrypted && php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} ) RUN php artisan storage:link -n RUN php artisan config:cache -n RUN php artisan event:cache -n @@ -79,4 +79,4 @@ RUN php artisan route:cache -n RUN php artisan view:cache -n RUN php artisan optimize -n -RUN rm ${LARAVEL_ENV_FILE} +RUN rm .env.${LARAVEL_ENV}* From 34bfc265b52cc60a5003df27bd8a33b4e94c1f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Fri, 19 Jul 2024 18:58:24 +0100 Subject: [PATCH 33/37] ci: wip --- dockerfiles/Dockerfile.seeder | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerfiles/Dockerfile.seeder b/dockerfiles/Dockerfile.seeder index e90ff9ce..55c47b69 100644 --- a/dockerfiles/Dockerfile.seeder +++ b/dockerfiles/Dockerfile.seeder @@ -26,8 +26,8 @@ ARG LARAVEL_ENV_FILE_KEY="" ENV APP_ENV=${LARAVEL_ENV} -COPY ${LARAVEL_ENV_FILE} ./ -RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} +COPY --chown=nobody ${LARAVEL_ENV_FILE} ./.env.${LARAVEL_ENV} +RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || ( mv .env.${LARAVEL_ENV} .env.${LARAVEL_ENV}.encrypted && php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} ) COPY public/ ./public/ COPY storage/ ./storage/ From 9c6058c1b8ffda6f20f3047154ab9d78b874d2da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Fri, 19 Jul 2024 19:30:10 +0100 Subject: [PATCH 34/37] ci: wip --- .env.railway.encrypted | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.railway.encrypted b/.env.railway.encrypted index ea042097..2dede3a4 100644 --- a/.env.railway.encrypted +++ b/.env.railway.encrypted @@ -1 +1 @@ -eyJpdiI6Ik9IQnB1S21CanNCVGdsZm9YenVPK2c9PSIsInZhbHVlIjoiVi96elNDclUxUHlGZTJacG13alFPZnNISkNJMERMQzFmRXc2L1lRRFlndWtvWWRuemJENU0xSEE3bk1JNzU3ZkdHYVh3SzYwcjQ2Uk5KeTlEbHZ1ek9aVzZXUU9jQ002MEVYODlrejBZOW9BN015UEpXSUxoU2xNUXJEN2JwUWlueCszY0dRWmg0VXhOS3pmT0kvNzlVVm9VL0tFOS9LVDJpNVlOSHMwaklYVkFjNUxGdmVrTjhRaTVUWVFHNnF1bW4wTHlXM2pUMmt4TmtaYkthbHAzWUsvL2dyYVdRbll4REZTZlNqc1cwWXFabHBsdWNEclhwN2Z5SjBQNE4xUkNVUjJ5TmkzYUx4THhESGk3VjZRdFFnMi94WHBUcWxhdnNSS3M0bGRUS1pNSkdSczNuV2pQbFAxcDUwWVRkU0VmakxRQkFDdXg1c3FubDZiR3pjRmNSSGZObC9hMzNJeHJzSmhtUlV2ZlprVUpUR1h2elNpUm9JTXl2RzZTTVFsS25MeUN6VmFDMTVBWEZpNklCUVVRMTYzMjVVTkpxT0ZOQmdNejhvbVdSbmJzUk9qb2pkbVE0RXoxSkxjRTU4ZENMV21UdXRqVktkVHRKYktkVk82akc2WlpYNGxJbW5acFVid1lsWjBjRnVZYUtxYTF0dStRU3dqWldSODRGSmR0RE5ZekgvbFZX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2N0Zwa1JCYk0vbXEyNUMrOTJmdS9PZHBvcCtqM3NFZ1pXWWZTazZjRDhBSGlrVzVpRTA3TjA3VkpKb1FLRFEwREJRS3h5RzhPZXdpeU5oWDA4aGNVQT09IiwibWFjIjoiODQwY2Y2NjJlMmEwNWU4MTNiMjY4ZTEwYTAxMWM1MGYwZmU0YTRjMTdlZjQxMDE3YzBjMTEyZThlNzBhZDQ2ZCIsInRhZyI6IiJ9 \ No newline at end of file From d47d5cba3f3f2d36bab1b0b8d23c33659af5f5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Fri, 19 Jul 2024 19:36:21 +0100 Subject: [PATCH 35/37] ci: wip --- dockerfiles/Dockerfile.website | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dockerfiles/Dockerfile.website b/dockerfiles/Dockerfile.website index 67eb30df..5b5d6420 100644 --- a/dockerfiles/Dockerfile.website +++ b/dockerfiles/Dockerfile.website @@ -73,10 +73,8 @@ ENV APP_ENV=${LARAVEL_ENV} RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || ( mv .env.${LARAVEL_ENV} .env.${LARAVEL_ENV}.encrypted && php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} ) RUN php artisan storage:link -n -RUN php artisan config:cache -n +# RUN php artisan config:cache -n RUN php artisan event:cache -n RUN php artisan route:cache -n RUN php artisan view:cache -n RUN php artisan optimize -n - -RUN rm .env.${LARAVEL_ENV}* From 8633bec22fb11431b2d4f5438630ba2d93209a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Fri, 19 Jul 2024 19:40:46 +0100 Subject: [PATCH 36/37] ci: wip --- .env.railway.encrypted | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.railway.encrypted b/.env.railway.encrypted index 2dede3a4..e1508acf 100644 --- a/.env.railway.encrypted +++ b/.env.railway.encrypted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dd42ceaf38485807e8bad8df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Fri, 19 Jul 2024 19:47:10 +0100 Subject: [PATCH 37/37] ci: wip --- dockerfiles/Dockerfile.website | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dockerfiles/Dockerfile.website b/dockerfiles/Dockerfile.website index 5b5d6420..67eb30df 100644 --- a/dockerfiles/Dockerfile.website +++ b/dockerfiles/Dockerfile.website @@ -73,8 +73,10 @@ ENV APP_ENV=${LARAVEL_ENV} RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || ( mv .env.${LARAVEL_ENV} .env.${LARAVEL_ENV}.encrypted && php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} ) RUN php artisan storage:link -n -# RUN php artisan config:cache -n +RUN php artisan config:cache -n RUN php artisan event:cache -n RUN php artisan route:cache -n RUN php artisan view:cache -n RUN php artisan optimize -n + +RUN rm .env.${LARAVEL_ENV}*