105 Commits

Author SHA1 Message Date
0333a65c35 remove .env from git tracking 2026-03-05 11:42:27 +03:00
9d0f270ad4 refactor(configs): remove trailing newlines from docker and config files 2026-03-03 17:33:20 +03:00
1f9c764935 refactor(configs): remove trailing newlines from docker and config files 2026-03-03 17:32:21 +03:00
da67c3a394 refactor(docker-compose, nginx.conf): remove comments, default nginx config 2026-03-03 17:27:37 +03:00
1f87549cc7 feat(livekit): add service 2026-03-03 17:24:22 +03:00
e42992f982 Merge branch 'eatvio-main' 2026-03-03 16:04:13 +03:00
791e12dc7b feat(Makefile): save db from dev2 command 2026-03-03 15:51:15 +03:00
7d9cc1fd33 ci(config): save 2026-02-09 13:12:22 +03:00
fa01eb6032 Merge pull request 'Добавил воркер для команды feed:generate, чтобы процессы оттуда не блокировали основной канал' (#29) from Hasan/eatvio-infra:merge_version into main
Reviewed-on: eatvio/eatvio-infra#29
Reviewed-by: Анатолий Полоз <t0ly.od@ya.ru>
2025-12-26 08:56:07 +00:00
e67ab0366f add laravel scout worker 2025-12-26 10:41:30 +03:00
ac1294d4b7 add feed generate worker 2025-12-24 17:35:33 +03:00
3d36a33485 ci(config): update 2025-10-27 16:55:36 +03:00
5dfb903a93 Merge pull request 'update php version' (#28) from apoloz/eatvio-infra:main into main
Reviewed-on: eatvio/eatvio-infra#28
2025-10-22 07:49:44 +00:00
dfed48a607 update php version 2025-10-22 10:49:09 +03:00
0d8b3242a0 Merge pull request 'refactor(web): nginx config updated, _vite ws forward added' (#27) from apoloz/eatvio-infra:main into main
Reviewed-on: eatvio/eatvio-infra#27
2025-10-22 07:48:09 +00:00
e9f42b83da refactor(web): nginx config updated, _vite ws forward added 2025-10-22 10:45:52 +03:00
d5c27da68a Merge pull request 'update(infra): php 8.3 to 8.4, typesense 26 -> 29' (#26) from apoloz/eatvio-infra:main into main
Reviewed-on: eatvio/eatvio-infra#26
2025-10-20 11:07:31 +00:00
e681536a23 update(infra): php 8.3 to 8.4, typesense 26 -> 29 2025-10-20 14:06:57 +03:00
e7cb197e68 Update Makefile 2025-09-26 08:11:08 +00:00
bd498cedae Merge pull request 'Update Makefile' (#25) from apoloz/eatvio-infra:main into main
Reviewed-on: eatvio/eatvio-infra#25
2025-08-05 10:34:49 +00:00
af781ca708 Update .env.infra-example 2025-08-05 10:34:06 +00:00
6f6145e423 Update Makefile 2025-08-05 10:31:35 +00:00
392ec6b589 Merge pull request 'main' (#24) from apoloz/eatvio-infra:main into main
Reviewed-on: eatvio/eatvio-infra#24
2025-07-29 17:52:38 +00:00
5bb41ee525 ci: rebuild scripts added 2025-07-29 20:51:54 +03:00
Anatoliy
823e81c8c9 refactor 2025-07-29 17:45:32 +03:00
a437620a80 Merge branch 'main' of ssh://10.55.5.123:222/alex_chevski/eatvio-infra 2025-07-15 11:00:23 +03:00
867b714748 feat(docker): added keys ssl 2025-07-08 14:10:45 +03:00
Anatoliy
f05219d249 commands added 2025-06-10 13:32:43 +03:00
412b413d6b feat(docker): added keys ssl 2025-01-28 14:21:54 +03:00
ef11d9ca1a Update .gitea/workflows/test_infra.yaml 2024-12-20 14:55:56 +00:00
Anatoliy Poloz
87e50f1ede Merge branch 'apoloz-main' 2024-12-20 17:50:11 +03:00
Anatoliy Poloz
1a96231959 merge with apoloz 2024-12-20 17:49:57 +03:00
9510ba1054 updates from main 2024-12-20 17:38:03 +03:00
c59731d756 feat(memcached, schedule) 2024-12-20 17:32:55 +03:00
5de2064003 Merge pull request 'fix(imagick)' (#22) from Hasan/eatvio-infra:main into main
Reviewed-on: eatvio/eatvio-infra#22
Reviewed-by: apoloz <t0ly.od@ya.ru>
2024-11-06 09:06:53 +00:00
0edc827a0f fix(imagick) 2024-11-06 12:04:52 +03:00
5d4ae88f4b chore(imagick): imagick to add container 2024-10-16 17:16:35 +03:00
1edcf15008 Merge pull request 'sync main' (#6) from eatvio/eatvio-infra:main into main
Reviewed-on: apoloz/eatvio-infra#6
2024-10-14 09:51:43 +00:00
0568dca39b Merge pull request 'added package jpeg-optim' (#20) from alex_chevski/eatvio-infra:main into main
Reviewed-on: eatvio/eatvio-infra#20
Reviewed-by: apoloz <t0ly.od@ya.ru>
2024-10-14 09:50:01 +00:00
0171918a40 Merge branch 'main' of ssh://10.55.5.123:222/alex_chevski/eatvio-infra 2024-10-14 12:46:40 +03:00
d33a6d16d8 refactor: compact dockerfile 2024-10-14 12:44:24 +03:00
ad45cccf66 Merge branch 'main' into main 2024-10-14 08:39:39 +00:00
8f446edc47 refactor(docker-compose.yml): restore docker-compose.yml to main 2024-10-14 11:33:56 +03:00
3e479e347d Merge pull request 'eatvio-infra' (#2) from eatvio-infra into main
Reviewed-on: #2
2024-10-14 08:25:25 +00:00
apoloz
2fd47cd342 Update .gitea/workflows/test_infra.yaml 2024-05-22 22:15:28 +00:00
apoloz
a3002c9da5 Update .gitea/workflows/test_infra.yaml 2024-05-22 22:12:36 +00:00
apoloz
368b173464 Update .gitea/workflows/test_infra.yaml 2024-05-22 22:09:45 +00:00
apoloz
19d427b34d Update .gitea/workflows/test_infra.yaml 2024-05-22 21:57:11 +00:00
apoloz
79c98d52fc Update .gitea/workflows/test_infra.yaml 2024-05-22 21:56:35 +00:00
apoloz
101f1c670d Update .gitea/workflows/test_infra.yaml 2024-05-22 21:55:46 +00:00
apoloz
76e5e84573 Update .gitea/workflows/test_infra.yaml 2024-05-22 21:54:37 +00:00
apoloz
e88413f3d8 Update .gitea/workflows/test_infra.yaml 2024-05-22 21:51:02 +00:00
apoloz
04d2e8b75d Update .gitea/workflows/test_infra.yaml 2024-05-22 21:50:03 +00:00
apoloz
988496a490 Update .env.infra-example 2024-05-22 21:48:45 +00:00
apoloz
74f8c69d3c Update .gitea/workflows/test_infra.yaml 2024-05-22 21:47:31 +00:00
apoloz
148da23e80 Update .gitea/workflows/test_infra.yaml 2024-05-22 21:44:21 +00:00
apoloz
9e2d930b7c Update .gitea/workflows/test_infra.yaml 2024-05-22 21:41:29 +00:00
apoloz
09f95788bf Update .gitea/workflows/test_infra.yaml 2024-05-22 21:41:06 +00:00
apoloz
02726200c1 Update .gitea/workflows/test_infra.yaml 2024-05-22 21:40:30 +00:00
apoloz
6d9ee3cccc Update .gitea/workflows/test_infra.yaml 2024-05-22 21:39:54 +00:00
apoloz
43428aab4c Update .gitea/workflows/test_infra.yaml 2024-05-22 21:32:48 +00:00
apoloz
d5b01ad23c Update .gitea/workflows/test_infra.yaml 2024-05-22 21:32:20 +00:00
apoloz
cddb338baf Update .gitea/workflows/test_infra.yaml 2024-05-22 21:31:47 +00:00
apoloz
3b3966f3e8 Update .gitea/workflows/test_infra.yaml 2024-05-22 21:26:33 +00:00
apoloz
7557c00b28 Update .gitea/workflows/test_infra.yaml 2024-05-22 21:25:26 +00:00
apoloz
6633541661 Update .gitea/workflows/test_infra.yaml 2024-05-22 21:10:47 +00:00
apoloz
473591668c Update .gitea/workflows/test_infra.yaml 2024-05-22 21:04:37 +00:00
apoloz
f1619fee9f Update .gitea/workflows/test_infra.yaml 2024-05-22 21:03:39 +00:00
apoloz
851349814c Update .gitea/workflows/test_infra.yaml 2024-05-22 20:46:05 +00:00
apoloz
dfff2abb65 Update .gitea/workflows/test_infra.yaml 2024-05-22 20:42:40 +00:00
apoloz
59b36f1390 Update .env.infra-example 2024-05-22 20:41:43 +00:00
apoloz
8ddb03cd30 Update .gitea/workflows/test_infra.yaml 2024-05-22 20:40:34 +00:00
apoloz
2939bfe4e9 Update .gitea/workflows/test_infra.yaml 2024-05-22 20:38:54 +00:00
apoloz
d401f64f1b Update .gitea/workflows/test_infra.yaml 2024-05-22 20:36:11 +00:00
apoloz
40de7ed07e Update .gitea/workflows/test_infra.yaml 2024-05-22 20:32:55 +00:00
apoloz
ee459376bd Update .gitea/workflows/test_infra.yaml 2024-05-22 20:24:35 +00:00
apoloz
1b0efb8cc4 Update .gitea/workflows/test_infra.yaml 2024-05-22 20:19:38 +00:00
apoloz
040f958978 Update .gitea/workflows/test_infra.yaml 2024-05-22 20:18:08 +00:00
apoloz
ece73cafe0 Update .gitea/workflows/test_infra.yaml 2024-05-22 20:17:25 +00:00
apoloz
4746ececb4 Update .gitea/workflows/test_infra.yaml 2024-05-22 20:12:22 +00:00
apoloz
2bd55c1f49 Update .gitea/workflows/test_infra.yaml 2024-05-22 20:03:03 +00:00
apoloz
029b9b3cba Update .gitea/workflows/test_infra.yaml 2024-05-22 20:01:55 +00:00
apoloz
ff9e94094b Update .gitea/workflows/test_infra.yaml 2024-05-22 20:00:16 +00:00
apoloz
483f037f55 Update .gitea/workflows/test_infra.yaml 2024-05-22 19:56:44 +00:00
apoloz
9d6ea54266 Update .gitea/workflows/test_infra.yaml 2024-05-22 19:54:19 +00:00
apoloz
0c145255ad Update .gitea/workflows/test_infra.yaml 2024-05-22 19:53:07 +00:00
apoloz
716d0a1b80 Update .gitea/workflows/test_infra.yaml 2024-05-22 19:52:17 +00:00
apoloz
53d304d64f Update .gitea/workflows/test_infra.yaml 2024-05-22 19:48:58 +00:00
apoloz
1c7d529531 Update .gitea/workflows/test_infra.yaml 2024-05-22 19:44:25 +00:00
apoloz
d37f9f1fdc Update .gitea/workflows/test_infra.yaml 2024-05-22 19:43:52 +00:00
apoloz
9d5bb53cb4 Update .env.infra-example 2024-05-22 19:41:54 +00:00
apoloz
2f53541cff Update .env.infra-example 2024-05-22 19:35:35 +00:00
apoloz
0ac4690746 Update .gitea/workflows/test_infra.yaml 2024-05-22 19:34:58 +00:00
apoloz
68ec6eeb9d Update .gitea/workflows/test_infra.yaml 2024-05-22 19:33:18 +00:00
apoloz
2e6fb5f9e1 Update .gitea/workflows/test_infra.yaml 2024-05-22 19:31:12 +00:00
apoloz
47f47cc630 Update .gitea/workflows/test_infra.yaml 2024-05-22 19:30:18 +00:00
apoloz
565b759715 Update .gitea/workflows/test_infra.yaml 2024-05-22 19:24:38 +00:00
apoloz
42e272b015 Merge pull request 'main' (#5) from eatvio/eatvio-infra:main into main
Reviewed-on: apoloz/eatvio-infra#5
2024-05-22 19:21:18 +00:00
apoloz
2257d9d5a8 Merge pull request 'eatvio-infra' (#17) from alex_chevski/eatvio-infra:eatvio-infra into main
Reviewed-on: eatvio/eatvio-infra#17
2024-05-22 19:18:56 +00:00
apoloz
c9063a027b Update .gitea/workflows/test_infra.yaml 2024-05-22 19:18:15 +00:00
Anatoliy Poloz
edf0499f3d test actions 2024-05-22 22:17:07 +03:00
apoloz
008b8e657a Merge pull request 'добавить в dockerfile сервис typesense' (#16) from alex_chevski/eatvio-infra:eatvio-infra into main
Reviewed-on: eatvio/eatvio-infra#16
Reviewed-by: apoloz <anatoliy.poloz@gmail.com>
2024-05-15 18:50:59 +00:00
apoloz
90ab8ba88a Merge pull request 'feat(intl): add php8.2-intl' (#15) from apoloz/eatvio-infra:main into main
Reviewed-on: eatvio/eatvio-infra#15
2024-04-11 11:14:28 +00:00
Anatoliy Poloz
2d2d1b7056 feat(intl): add php8.2-intl 2024-04-11 14:13:40 +03:00
1a716c0d8a Merge pull request 'eatvio-infra' (#1) from eatvio-infra into main
Reviewed-on: https://gittea.eatv.io/alex_chevski/eatvio-infra/pulls/1
2024-01-23 09:31:29 +00:00
12 changed files with 546 additions and 262 deletions

View File

@@ -11,4 +11,17 @@ MYSQL_ROOT_PASSWORD="nhbnhb22"
MYSQL_DATABASE="eatvio"
MYSQL_USER="eatvio_user"
MYSQL_PASSWORD="eatvio_pass_nhbnhb22"
PROD_DB_USER=some_user
PROD_DB_PASS=strong_pass
PROD_DB_FILE="latest-prod-db.sql"
PROD_DB_HOST="10.nn.n.n"
PROD_DB_PORT="10nn"
MY_APP_GIT_URL="ssh://git@10.55.5.123:222/eatvio/eatvio.git"
LIVEKIT_URL="livekit.eatv.io"
LIVEKIT_WS_URL="livekit.eatv.io"
LIVEKIT_TURN_DOMAIN="turn.eatv.io"
LIVEKIT_API_KEY=APITRajpYFYdtk9
LIVEKIT_API_SECRET=VKCfO954C3OU0IeeXxZ1fiUDx9ZmWtvNNp9fCHRfO2JH
LIVEKIT_PORT=7880
LIVEKIT_RTC_TCP_PORT=7881
LIVEKIT_TURN_UDP_PORT=3478

View File

@@ -0,0 +1,38 @@
name: "infra 0.0.0.1"
on:
pull_request:
branches:
- main-ci
jobs:
test:
runs-on: ubuntu-latest
name: Test
steps:
- uses: actions/checkout@v3
- name: Add the SSH key to known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
mkdir -p ~/.ssh
ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" || true
ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts || true
chmod 644 ~/.ssh/known_hosts || true
chmod 700 ~/.ssh || true
- name: init containers
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
apt-get update
apt-get install -y apt-transport-https ca-certificates curl software-properties-common docker.io
curl -L "https://github.com/docker/compose/releases/download/v2.17.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version
make init
- name: run CI
run: make ci

147
Makefile
View File

@@ -1,107 +1,186 @@
include .env.infra-example
include .env
clone:
git clone ${MY_APP_GIT_URL} app
rm-promo-image-assets:
docker compose exec php-fpm rm -rf application/database/assets/images
clone-promo-image:
git clone http://gitea.office.local:3000/alex_chevski/eatvio_images_assets app/database/assets/images
reinit-promo-images: rm-promo-image-assets clone-promo-image
start:
docker-compose up -d
docker compose up -d
stop:
docker-compose down --remove-orphans -v
docker compose down
restart: stop start
status:
docker-compose ps
docker compose ps
rm-promo-image-assets:
rm -rf app/database/assets/images
clone-promo-image:
git clone http://gitea.office.local:3000/alex_chevski/eatvio_images_assets app/database/assets/images
reinit-promo-images: rm-promo-image-assets clone-promo-image
bash:
docker-compose exec php-fpm bash
docker compose exec php-fpm bash
worker-restart:
docker-compose exec worker supervisorctl restart laravel-worker:*
docker compose exec worker supervisorctl restart laravel-worker:*
clear-images:
docker-compose exec php-fpm ./artisan clear:orphaned-images
docker compose exec php-fpm ./artisan clear:orphaned-images
links-images:
jdupes -r -1 -l app/storage/app
tinker:
docker-compose exec php-fpm ./artisan tinker
docker compose exec php-fpm ./artisan tinker
reseed-db:
docker-compose exec php-fpm bash -c "./artisan migrate:refresh; ./artisan db:seed"
docker compose exec php-fpm bash -c "./artisan migrate:refresh; ./artisan db:seed"
setup-laravel-key:
docker-compose exec php-fpm php /application/artisan key:generate
docker compose exec php-fpm php /application/artisan key:generate
setup-laravel-packages:
docker-compose exec php-fpm composer install
docker compose exec php-fpm composer install
copy-laravel-env:
docker-compose exec php-fpm cp /application/.env.example /application/.env
docker compose exec php-fpm cp /application/.env.example /application/.env
copy-infra-env:
cp .env.infra-example .env
run-migrations:
docker-compose exec php-fpm ./artisan migrate
docker compose exec php-fpm ./artisan migrate
run-plan-seed:
docker-compose exec php-fpm ./artisan db:seed --class=PlanSeeder
docker compose exec php-fpm ./artisan db:seed --class=PlanSeeder
run-user-seed:
docker-compose exec php-fpm ./artisan db:seed --class=UserSeeder
docker compose exec php-fpm ./artisan db:seed --class=UserSeeder
seed-db:
docker-compose exec php-fpm ./artisan db:seed
docker compose exec php-fpm ./artisan db:seed
fix-permissions:
docker-compose exec php-fpm chown -R www-data:www-data storage
docker compose exec php-fpm chown -R www-data:www-data storage
fix-code-style:
docker-compose exec php-fpm vendor/bin/pint
docker compose exec -T php-fpm bash -c "vendor/bin/pint --parallel; composer run fix-blade-fomatting"
fix-blade-formatting:
docker compose exec -T php-fpm composer run test-blade-formatting
artisan:
docker-compose exec php-fpm ./artisan $(ARGS)
docker compose exec php-fpm ./artisan $(ARGS)
mysql-console:
docker-compose exec mysql mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE}
docker compose exec mysql mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE}
mysql-dump-local:
docker compose exec mysql mysqldump --single-transaction --skip-opt -u${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE}
mysql-restore:
docker compose exec mysql bash -c "mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE} < /application/eatvio-restore.sql"
mysql-save-prod-db:
mysqldump --single-transaction -u${PROD_DB_USER} -p${PROD_DB_PASS} -h${PROD_DB_HOST} -P${PROD_DB_PORT} eatvio > ${PROD_DB_FILE}
mysql-restore-saved-from-prod-db:
docker compose exec mysql bash -c "cat ./${PROD_DB_FILE} | mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE}"
mysql-remove-latest-prod-db:
rm -f ${PROD_DB_FILE}
mysql-import-db-from-prod: mysql-save-prod-db mysql-restore-saved-from-prod-db mysql-remove-latest-prod-db
start-frontend:
docker-compose exec php-fpm npm run watch
docker compose exec frontend npm run watch
build-frontend-prod:
docker-compose exec php-fpm npm run production
docker compose exec php-fpm bash -c "npm install -g npm@latest; npm run production"
make-storage-link:
docker-compose exec php-fpm ./artisan storage:link
docker compose exec php-fpm ./artisan storage:link
node-frontend-deps:
docker-compose exec php-fpm npm i --legacy-peer-deps
docker compose exec php-fpm npm i --legacy-peer-deps
test:
docker-compose exec php-fpm vendor/bin/paratest
paratest-bin:
docker compose exec -u www-data php-fpm vendor/bin/paratest
paratest-artisan:
docker compose exec -u www-data -T php-fpm ./artisan test --parallel --stop-on-failure --env=testing
fix-insights:
docker-compose exec php-fpm ./artisan insights --fix
docker compose exec php-fpm vendor/bin/phpinsights --fix --config-path=./config/insights.php --no-interaction --min-quality=80 --min-complexity=90 --min-architecture=75 --min-style=95
insights:
docker-compose exec php-fpm vendor/bin/phpinsights --config-path=./config/insights.php --no-interaction --min-quality=80 --min-complexity=90 --min-architecture=75 --min-style=95
docker compose exec -T php-fpm vendor/bin/phpinsights --config-path=./config/insights.php --no-interaction --min-quality=80 --min-complexity=90 --min-architecture=75 --min-style=95 --flush-cache
rector:
docker-compose exec php-fpm vendor/bin/rector process --dry-run
docker compose exec -T php-fpm vendor/bin/rector process --dry-run
static-analysis:
docker-compose exec php-fpm composer static-analysis
docker compose exec -T php-fpm composer static-analysis
detect-magic-numbers:
docker-compose exec php-fpm vendor/bin/phpmnd app/ tests/
docker compose exec -u www-data -T php-fpm vendor/bin/phpmnd app/ tests/
ci: fix-code-style detect-magic-numbers test rector insights static-analysis
fix-web-permissions:
docker compose exec -T php-fpm chown -R www-data:www-data bootstrap/cache storage
local-ci:
docker-compose exec -T php-fpm composer ci
clear-app-cache:
docker compose exec php-fpm ./artisan optimize:clear
build-front:
docker compose exec php-fpm bash -c "npm install -g npm@latest;npm run production"
reindex-search:
docker compose exec php-fpm ./artisan search:init
composer-do:
docker compose exec php-fpm composer dump-auto
run-once-oprations:
docker compose exec php-fpm bash -c "./artisan operations:process"
reload-wokers:
docker-compose exec worker ./artisan queue:restart
after-deploy-light: composer-do run-migrations run-once-oprations clear-app-cache build-front fix-permissions reload-wokers
after-deploy: composer-do clear-app-cache run-migrations run-once-oprations build-front fix-permissions reload-wokers reindex-search
# ci: fix-web-permissions fix-code-style detect-magic-numbers test rector insights static-analysis fix-web-permissions
ci: fix-web-permissions detect-magic-numbers test rector insights static-analysis fix-web-permissions
local-composer-ci:
docker compose exec php-fpm composer ci
test: fix-web-permissions paratest-artisan
test-file-by-path:
docker compose exec php-fpm ./artisan test --env=testing $(ARGS)
local-ci: fix-web-permissions local-composer-ci fix-web-permissions
init: clone copy-infra-env restart setup-laravel-packages copy-laravel-env setup-laravel-key run-migrations node-frontend-deps build-frontend-prod fix-permissions make-storage-link
rebuild-services:
docker compose build --no-cache
pull-services:
docker compose pull
force-rebuild-services: stop rebuild-services pull-services start

View File

@@ -1,5 +1,3 @@
---
version: "3.1"
services:
soketi:
image: "quay.io/soketi/soketi:latest-16-alpine"
@@ -20,6 +18,14 @@ services:
- "traefik.enable=false"
restart: always
memcached:
image: "memcached:alpine"
networks:
- ns-eatvio
restart: always
labels:
- "traefik.enable=false"
mysql:
image: "mysql:8.0"
working_dir: /application
@@ -33,6 +39,7 @@ services:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
TZ: "Evrope/Moscow"
ports:
- "1094:3306"
labels:
@@ -46,31 +53,35 @@ services:
- TZ=Europe/Moscow
depends_on:
- mysql
- worker
- frontend
- memcached
- typesense
networks:
- ns-eatvio
volumes:
- "./app:/application"
- "./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/8.2/fpm/conf.d/99-overrides.ini"
- "./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/8.4/fpm/conf.d/99-overrides.ini"
- "./tbank_certs:/tbank_certs"
# - "./eatvio-3467b-firebase-adminsdk-fbsvc-6e149b2a5a.json:/eatvio-3467b-firebase-adminsdk-fbsvc-6e149b2a5a.json"
labels:
- "traefik.enable=false"
restart: always
frontend:
build: phpdocker/front-end
command: "npm run watch"
command: "npm run dev"
working_dir: /application
environment:
- TZ=Europe/Moscow
depends_on:
- mysql
- php-fpm
#- CHOKIDAR_USEPOLLING=true
networks:
- ns-eatvio
volumes:
- "./app:/application"
labels:
- "traefik.enable=false"
restart: always
restart: unless-stopped
worker:
build: phpdocker/worker
@@ -80,13 +91,14 @@ services:
command: "service supervisor start"
depends_on:
- mysql
- php-fpm
networks:
- ns-eatvio
volumes:
- "./app:/application"
- "./phpdocker/worker/php-ini-overrides.ini:/etc/php/8.2/fpm/conf.d/99-overrides.ini"
- "./phpdocker/worker/php-ini-overrides.ini:/etc/php/8.4/fpm/conf.d/99-overrides.ini"
- "./phpdocker/worker/laravel-worker.conf:/etc/supervisor/conf.d/laravel-worker.conf"
- "./tbank_certs:/tbank_certs"
# - "./eatvio-3467b-firebase-adminsdk-fbsvc-6e149b2a5a.json:/eatvio-3467b-firebase-adminsdk-fbsvc-6e149b2a5a.json"
labels:
- "traefik.enable=false"
restart: always
@@ -101,16 +113,18 @@ services:
volumes:
- "./app:/application"
- "./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf"
- "./phpdocker/nginx/alex.eatvio.local+4.pem:/etc/nginx/alex.eatvio.local+4.pem"
- "./phpdocker/nginx/alex.eatvio.local+4-key.pem:/etc/nginx/alex.eatvio.local+4-key.pem"
- "./phpdocker/nginx/socket.alex.eatvio.local+4.pem:/etc/nginx/socket.alex.eatvio.local+4.pem"
- "./phpdocker/nginx/socket.alex.eatvio.local+4-key.pem:/etc/nginx/socket.alex.eatvio.local+4-key.pem"
ports:
- "1092:80"
- "10443:5000"
- "1092:80"
networks:
- web
- ns-eatvio
labels:
- "traefik.docker.network=web"
- "traefik.enable=true"
- "traefik.frontend.rule=Host:wstesting.eatv.io,testing.eatv.io"
- "traefik.port=80"
- "traefik.protocol=http"
mailhog:
image: "mailhog/mailhog"
@@ -120,24 +134,79 @@ services:
- ns-eatvio
typesense:
image: typesense/typesense:26.0
restart: on-failure
expose:
- 8108
ports:
- 8108:8108
build: ./phpdocker/typesense
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8108/health"]
networks:
- ns-eatvio
- web
volumes:
- ./typesense-data:/data
command: "--data-dir /data --api-key=typesense --enable-cors"
livekit-redis:
image: redis:7-alpine
command:
[
"redis-server",
"--appendonly",
"no",
"--maxmemory",
"500mb",
"--maxmemory-policy",
"allkeys-lru",
]
networks:
- ns-eatvio
volumes:
- livekit_redis_data:/data
restart: always
labels:
- "traefik.enable=false"
livekit:
image: livekit/livekit-server:latest
depends_on:
- livekit-redis
networks:
- ns-eatvio
- web
ports:
- "${LIVEKIT_PORT:-7880}:7880"
- "${LIVEKIT_RTC_TCP_PORT:-7881}:7881"
- "50000-50100:50000-50100/udp"
- "${LIVEKIT_TURN_UDP_PORT:-3478}:3478/udp"
environment:
LIVEKIT_CONFIG: |
port: 7880
log_level: info
rtc:
tcp_port: 7881
port_range_start: 50000
port_range_end: 50100
use_external_ip: true
redis:
address: livekit-redis:6379
keys:
${LIVEKIT_API_KEY}: ${LIVEKIT_API_SECRET}
turn:
enabled: true
domain: ${LIVEKIT_TURN_DOMAIN}
udp_port: 3478
# tls_port: 5349
restart: always
labels:
- "traefik.docker.network=web"
- "traefik.enable=true"
- "traefik.frontend.rule=Host:turn.eatv.io,livekit.eatv.io"
- "traefik.port=${LIVEKIT_PORT:-7880}"
- "traefik.protocol=http"
networks:
web:
external: true
ns-eatvio:
external: false
ipam:
config:
- subnet: 172.118.0.0/28
volumes:
livekit_redis_data:

View File

@@ -1,208 +1,232 @@
<html>
<head>
<title>PHPDocker.io Readme</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<style>
code {
background-color : #ddd;
padding : 2px 5px;
font-family : monospace;
font-size : 16px;
}
</style>
<head>
<title>PHPDocker.io Readme</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<style>
code {
background-color: #ddd;
padding: 2px 5px;
font-family: monospace;
font-size: 16px;
}
</style>
</head>
<body>
<div class="pure-g">
<div class="pure-g">
<div class="pure-u-1-24"></div>
<div class="pure-u-22-24">
<h1>PHPDocker.io generated environment</h1>
<h1>PHPDocker.io generated environment</h1>
<h1>Add to your project</h1>
<h1>Add to your project</h1>
<p>Simply, unzip the file into your project, this will create <code>docker-compose.yml</code> on the root of your project and a folder
named <code>phpdocker</code> containing nginx and php-fpm config for it.</p>
<p>Simply, unzip the file into your project, this will create <code>docker-compose.yml</code> on the root of your
project and a folder
named <code>phpdocker</code> containing nginx and php-fpm config for it.</p>
<p>Ensure the webserver config on <code>phpdocker/nginx/nginx.conf</code> is correct for your project. PHPDocker.io will have
customised this file according to the front controller location relative to the docker-compose file you chose on the
generator (by default <code>public/index.php</code>).</p>
<p>Ensure the webserver config on <code>phpdocker/nginx/nginx.conf</code> is correct for your project.
PHPDocker.io will have
customised this file according to the front controller location relative to the docker-compose file you chose on
the
generator (by default <code>public/index.php</code>).</p>
<p>Note: you may place the files elsewhere in your project. Make sure you modify the locations for the php-fpm dockerfile,
the php.ini overrides and nginx config on <code>docker-compose.yml</code> if you do so.</p>
<p>Note: you may place the files elsewhere in your project. Make sure you modify the locations for the php-fpm
dockerfile,
the php.ini overrides and nginx config on <code>docker-compose.yml</code> if you do so.</p>
<h1>How to run</h1>
<h1>How to run</h1>
<p>Dependencies:</p>
<p>Dependencies:</p>
<ul>
<li>docker. See <a href="https://docs.docker.com/engine/installation">https://docs.docker.com/engine/installation</a></li>
<li>docker-compose. See <a href="https://docs.docker.com/compose/install/">docs.docker.com/compose/install</a></li>
</ul>
<ul>
<li>docker. See <a
href="https://docs.docker.com/engine/installation">https://docs.docker.com/engine/installation</a></li>
<li>docker-compose. See <a href="https://docs.docker.com/compose/install/">docs.docker.com/compose/install</a>
</li>
</ul>
<p>Once you're done, simply <code>cd</code> to your project and run <code>docker-compose up -d</code>. This will initialise and start all the
containers, then leave them running in the background.</p>
<p>Once you're done, simply <code>cd</code> to your project and run <code>docker-compose up -d</code>. This will
initialise and start all the
containers, then leave them running in the background.</p>
<h2>Services exposed outside your environment</h2>
<h2>Services exposed outside your environment</h2>
<p>You can access your application via <strong><code>localhost</code></strong>. Mailhog and nginx both respond to any hostname, in case you want to
add your own hostname on your <code>/etc/hosts</code></p>
<p>You can access your application via <strong><code>localhost</code></strong>. Mailhog and nginx both respond to
any hostname, in case you want to
add your own hostname on your <code>/etc/hosts</code></p>
<table>
<thead>
<tr>
<th>Service</th>
<th>Address outside containers</th>
</tr>
</thead>
<tbody>
<tr>
<td>Webserver</td>
<td><a href="http://localhost:1092">localhost:1092</a></td>
</tr>
<tr>
<td>MySQL</td>
<td><strong>host:</strong> <code>localhost</code>; <strong>port:</strong> <code>1094</code></td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Service</th>
<th>Address outside containers</th>
</tr>
</thead>
<tbody>
<tr>
<td>Webserver</td>
<td><a href="http://localhost:1092">localhost:1092</a></td>
</tr>
<tr>
<td>MySQL</td>
<td><strong>host:</strong> <code>localhost</code>; <strong>port:</strong> <code>1094</code></td>
</tr>
</tbody>
</table>
<h2>Hosts within your environment</h2>
<h2>Hosts within your environment</h2>
<p>You'll need to configure your application to use any services you enabled:</p>
<p>You'll need to configure your application to use any services you enabled:</p>
<table>
<thead>
<tr>
<th>Service</th>
<th>Hostname</th>
<th>Port number</th>
</tr>
</thead>
<tbody>
<tr>
<td>php-fpm</td>
<td>php-fpm</td>
<td>9000</td>
</tr>
<tr>
<td>MySQL</td>
<td>mysql</td>
<td>3306 (default)</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Service</th>
<th>Hostname</th>
<th>Port number</th>
</tr>
</thead>
<tbody>
<tr>
<td>php-fpm</td>
<td>php-fpm</td>
<td>9000</td>
</tr>
<tr>
<td>MySQL</td>
<td>mysql</td>
<td>3306 (default)</td>
</tr>
</tbody>
</table>
<h1>Docker compose cheatsheet</h1>
<h1>Docker compose cheatsheet</h1>
<p><strong>Note:</strong> you need to cd first to where your docker-compose.yml file lives.</p>
<p><strong>Note:</strong> you need to cd first to where your docker-compose.yml file lives.</p>
<ul>
<li>Start containers in the background: <code>docker-compose up -d</code></li>
<li>Start containers on the foreground: <code>docker-compose up</code>. You will see a stream of logs for every container running.
ctrl+c stops containers.</li>
<li>Stop containers: <code>docker-compose stop</code></li>
<li>Kill containers: <code>docker-compose kill</code></li>
<li>View container logs: <code>docker-compose logs</code> for all containers or <code>docker-compose logs SERVICE_NAME</code> for the logs of
all containers in <code>SERVICE_NAME</code>.</li>
<li>Execute command inside of container: <code>docker-compose exec SERVICE_NAME COMMAND</code> where <code>COMMAND</code> is whatever you want
to run. Examples:
<ul>
<li>Start containers in the background: <code>docker-compose up -d</code></li>
<li>Start containers on the foreground: <code>docker-compose up</code>. You will see a stream of logs for every
container running.
ctrl+c stops containers.</li>
<li>Stop containers: <code>docker-compose stop</code></li>
<li>Kill containers: <code>docker-compose kill</code></li>
<li>View container logs: <code>docker-compose logs</code> for all containers or <code>docker-compose logs
SERVICE_NAME</code> for the logs of
all containers in <code>SERVICE_NAME</code>.</li>
<li>Execute command inside of container: <code>docker-compose exec SERVICE_NAME COMMAND</code> where
<code>COMMAND</code> is whatever you want
to run. Examples:
<ul>
<li>Shell into the PHP container, <code>docker-compose exec php-fpm bash</code></li>
<li>Run symfony console, <code>docker-compose exec php-fpm bin/console</code></li>
<li>Open a mysql shell, <code>docker-compose exec mysql mysql -uroot -pCHOSEN_ROOT_PASSWORD</code></li>
</ul></li>
</ul>
<ul>
<li>Shell into the PHP container, <code>docker-compose exec php-fpm bash</code></li>
<li>Run symfony console, <code>docker-compose exec php-fpm bin/console</code></li>
<li>Open a mysql shell, <code>docker-compose exec mysql mysql -uroot -pCHOSEN_ROOT_PASSWORD</code></li>
</ul>
</li>
</ul>
<h1>Application file permissions</h1>
<h1>Application file permissions</h1>
<p>As in all server environments, your application needs the correct file permissions to work properly. You can change the
files throughout the container, so you won't care if the user exists or has the same ID on your host.</p>
<p>As in all server environments, your application needs the correct file permissions to work properly. You can
change the
files throughout the container, so you won't care if the user exists or has the same ID on your host.</p>
<p><code>docker-compose exec php-fpm chown -R www-data:www-data /application/public</code></p>
<p><code>docker-compose exec php-fpm chown -R www-data:www-data /application/public</code></p>
<h1>Recommendations</h1>
<h1>Recommendations</h1>
<p>It's hard to avoid file permission issues when fiddling about with containers due to the fact that, from your OS point
of view, any files created within the container are owned by the process that runs the docker engine (this is usually
root). Different OS will also have different problems, for instance you can run stuff in containers
using <code>docker exec -it -u $(id -u):$(id -g) CONTAINER_NAME COMMAND</code> to force your current user ID into the process, but
this will only work if your host OS is Linux, not mac. Follow a couple of simple rules and save yourself a world of
hurt.</p>
<p>It's hard to avoid file permission issues when fiddling about with containers due to the fact that, from your
OS point
of view, any files created within the container are owned by the process that runs the docker engine (this is
usually
root). Different OS will also have different problems, for instance you can run stuff in containers
using <code>docker exec -it -u $(id -u):$(id -g) CONTAINER_NAME COMMAND</code> to force your current user ID
into the process, but
this will only work if your host OS is Linux, not mac. Follow a couple of simple rules and save yourself a world
of
hurt.</p>
<ul>
<li>Run composer outside of the php container, as doing so would install all your dependencies owned by <code>root</code> within your
vendor folder.</li>
<li>Run commands (ie Symfony's console, or Laravel's artisan) straight inside of your container. You can easily open a
shell as described above and do your thing from there.</li>
</ul>
<ul>
<li>Run composer outside of the php container, as doing so would install all your dependencies owned by
<code>root</code> within your
vendor folder.</li>
<li>Run commands (ie Symfony's console, or Laravel's artisan) straight inside of your container. You can easily
open a
shell as described above and do your thing from there.</li>
</ul>
<h1>Simple basic Xdebug configuration with integration to PHPStorm</h1>
<h1>Simple basic Xdebug configuration with integration to PHPStorm</h1>
<h2>Xdebug 2</h2>
<h2>Xdebug 2</h2>
<p>To configure <strong>Xdebug 2</strong> you need add these lines in php-fpm/php-ini-overrides.ini:</p>
<p>To configure <strong>Xdebug 2</strong> you need add these lines in php-fpm/php-ini-overrides.ini:</p>
<h3>For linux:</h3>
<h3>For linux:</h3>
<pre><code>xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.remote_autostart = 1
</code></pre>
<pre><code>xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.remote_autostart = 1
</code></pre>
<h3>For macOS and Windows:</h3>
<h3>For macOS and Windows:</h3>
<pre><code>xdebug.remote_enable = 1
xdebug.remote_host = host.docker.internal
xdebug.remote_autostart = 1
</code></pre>
<pre><code>xdebug.remote_enable = 1
xdebug.remote_host = host.docker.internal
xdebug.remote_autostart = 1
</code></pre>
<h2>Xdebug 3</h2>
<h2>Xdebug 3</h2>
<p>To configure <strong>Xdebug 3</strong> you need add these lines in php-fpm/php-ini-overrides.ini:</p>
<p>To configure <strong>Xdebug 3</strong> you need add these lines in php-fpm/php-ini-overrides.ini:</p>
<h3>For linux:</h3>
<h3>For linux:</h3>
<pre><code>xdebug.mode = debug
xdebug.remote_connect_back = true
xdebug.start_with_request = yes
</code></pre>
<pre><code>xdebug.mode = debug
xdebug.remote_connect_back = true
xdebug.start_with_request = yes
</code></pre>
<h3>For macOS and Windows:</h3>
<h3>For macOS and Windows:</h3>
<pre><code>xdebug.mode = debug
xdebug.remote_host = host.docker.internal
xdebug.start_with_request = yes
</code></pre>
<pre><code>xdebug.mode = debug
xdebug.remote_host = host.docker.internal
xdebug.start_with_request = yes
</code></pre>
<h2>Add the section “environment” to the php-fpm service in docker-compose.yml:</h2>
<h2>Add the section “environment” to the php-fpm service in docker-compose.yml:</h2>
<pre><code>environment:
PHP_IDE_CONFIG: "serverName=Docker"
</code></pre>
<pre><code>environment:
PHP_IDE_CONFIG: "serverName=Docker"
</code></pre>
<h3>Create a server configuration in PHPStorm:</h3>
<h3>Create a server configuration in PHPStorm:</h3>
<ul>
<li>In PHPStorm open Preferences | Languages &amp; Frameworks | PHP | Servers</li>
<li>Add new server</li>
<li>The “Name” field should be the same as the parameter “serverName” value in “environment” in docker-compose.yml (i.e. *
Docker* in the example above)</li>
<li>A value of the "port" field should be the same as first port(before a colon) in "webserver" service in
docker-compose.yml</li>
<li>Select "Use path mappings" and set mappings between a path to your project on a host system and the Docker container.</li>
<li>Finally, add “Xdebug helper” extension in your browser, set breakpoints and start debugging</li>
</ul>
<ul>
<li>In PHPStorm open Preferences | Languages &amp; Frameworks | PHP | Servers</li>
<li>Add new server</li>
<li>The “Name” field should be the same as the parameter “serverName” value in “environment” in
docker-compose.yml (i.e. *
Docker* in the example above)</li>
<li>A value of the "port" field should be the same as first port(before a colon) in "webserver" service in
docker-compose.yml</li>
<li>Select "Use path mappings" and set mappings between a path to your project on a host system and the Docker
container.</li>
<li>Finally, add “Xdebug helper” extension in your browser, set breakpoints and start debugging</li>
</ul>
</div>
<div class="pure-u-1-24"></div>
</div>
</div>
<script>
var tables = document.getElementsByTagName('table')
for (var i = 0; i < tables.length; i++) {
tables[i].className = 'pure-table'
}
</script>
<script>
var tables = document.getElementsByTagName('table')
for (var i = 0; i < tables.length; i++) {
tables[i].className = 'pure-table'
}
</script>
</body>
</html>

View File

@@ -139,6 +139,3 @@ environment:
docker-compose.yml
* Select "Use path mappings" and set mappings between a path to your project on a host system and the Docker container.
* Finally, add “Xdebug helper” extension in your browser, set breakpoints and start debugging

View File

@@ -1,15 +1,15 @@
FROM phpdockerio/php:8.2-fpm
FROM phpdockerio/php:8.4-fpm
WORKDIR "/application"
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN curl -sL https://deb.nodesource.com/setup_24.x | bash -
RUN apt-get update && \
apt-get -y --no-install-recommends install \
git \
php8.2-gd \
php8.2-mysql \
php8.2-sqlite3 \
php8.2-pgsql \
nodejs && npm install -g npm@10.1.0 \
php8.4-gd \
php8.4-mysql \
php8.4-sqlite3 \
php8.4-pgsql \
nodejs && npm install -g npm@latest \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

View File

@@ -2,29 +2,62 @@ upstream phpupstream {
server php-fpm:9000 fail_timeout=5s max_fails=5;
}
resolver 127.0.0.11 ipv6=off;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_name dev2.eatvio.com;
server_name my-dev.eatvio.test; # change me
client_max_body_size 108M;
rewrite_log on;
# access_log /var/log/nginx/application.access.log;
access_log /dev/stdout;
error_log /dev/stdout info;
root /application/public;
index index.php;
# Vite HMR WebSocket and assets
location /_vite {
proxy_pass http://frontend:5173;
proxy_http_version 1.1;
# WebSocket support
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
# Headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
# Timeouts
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
}
# Production build assets
location /build {
try_files $uri $uri/ =404;
expires 1y;
add_header Cache-Control "public, immutable";
}
# try to serve file directly, fallback to index.php
location / {
try_files $uri /index.php$is_args$args;
}
if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
}
location ~ \.php$ {
#resolver 127.0.0.11;
#set $upstream php-fpm:9000;
@@ -39,12 +72,13 @@ server {
include fastcgi_params;
}
}
server {
listen 80;
server_name socket.eatvio.com;
server_name ws-my-dev.eatvio.test; # change me
location / {
proxy_pass http://172.118.0.5:6001;
proxy_pass http://soketi:6001;
proxy_read_timeout 60;
proxy_connect_timeout 60;
proxy_redirect off;

View File

@@ -1,29 +1,20 @@
FROM phpdockerio/php:8.2-fpm
FROM phpdockerio/php:8.4-fpm
WORKDIR "/application"
# ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.29/supercronic-linux-amd64 \
# SUPERCRONIC=supercronic-linux-amd64 \
# SUPERCRONIC_SHA1SUM=cd48d45c4b10f3f0bfdd3a57d054cd05ac96812b
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN curl -sL https://deb.nodesource.com/setup_24.x | bash -
RUN apt-get update && \
apt-get -y --no-install-recommends install \
git \
php8.2-gd \
php8.2-mysql \
php8.2-sqlite3 \
php8.2-intl \
php8.2-pgsql \
python3-pkg-resources supervisor \
nodejs && npm install -g npm@10.1.0 \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN apt-get update && \
apt-get install -y \
ffmpeg \
jpegoptim && \
imagemagick php8.4-imagick \
php8.4-gd \
php8.4-mysql \
php8.4-sqlite3 \
php8.4-intl \
php8.4-memcached \
php8.4-pgsql \
php8.4-xdebug \
python3-pkg-resources supervisor ffmpeg jpegoptim \
nodejs && npm install -g npm@latest \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

3
phpdocker/typesense/Dockerfile Executable file
View File

@@ -0,0 +1,3 @@
FROM typesense/typesense:29.0
USER root
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*

View File

@@ -1,16 +1,12 @@
FROM phpdockerio/php:8.2-fpm
FROM phpdockerio/php:8.4-fpm
WORKDIR "/application"
RUN apt-get update && \
apt-get -y --no-install-recommends install git \
php8.2-gd php8.2-mysql php8.2-sqlite3 php8.2-pgsql \
php8.4-gd php8.4-mysql php8.4-sqlite3 php8.4-pgsql ffmpeg jpegoptim \
php8.4-intl \
php8.4-memcached \
imagemagick php8.4-imagick \
python3-pkg-resources supervisor && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN apt-get update && \
apt-get install -y \
ffmpeg \
jpegoptim && \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

View File

@@ -13,3 +13,43 @@ numprocs=2
redirect_stderr=true
stdout_logfile=/application/storage/logs/worker.log
stopwaitsecs=3600
[program:laravel-schedule]
process_name=%(program_name)s_%(process_num)02d
command=php /application/artisan schedule:work
directory=/application
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=1
redirect_stderr=true
stdout_logfile=/application/storage/logs/schedule.log
stopwaitsecs=3600
[program:laravel-feed-generation-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /application/artisan queue:work --queue=feed-generation --sleep=1 --tries=3 --timeout=1800 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=8
redirect_stderr=true
stdout_logfile=/application/storage/logs/feed-generation-worker.log
stopwaitsecs=3600
[program:laravel-scout-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /application/artisan queue:work --queue=scout --sleep=1 --tries=3 --timeout=300 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=8
redirect_stderr=true
stdout_logfile=/application/storage/logs/scout-worker.log
stopwaitsecs=3600