- Add Analytics container: models, tasks, jobs, controllers, routes, services - Add analytics config with section groups (structure, institute, content, services) - Add database tables: analytics_sessions, analytics_hits, analytics_daily_stats - Add frontend: Analytics page, section detail, chart, overview, navigation components - Add consent banner and JS tracking service (sendBeacon + Inertia listener) - Add permission sync for view_analytics, view_any_analytic - Fix trailing slash URL matching in GetNavigationSectionsTask - Fix event propagation on expand arrows in navigation sections - Fix RecordVisitJob to not depend on dropped analytics_geo_cache table - Replace plain text views/visitors with badge-style icons - Group navigation sections by category with separate blocks - Add config-driven non-CMS sections (faculties, divisions, DPO, journals) - Remove Events, TV, Sveden from analytics sections
128 lines
2.7 KiB
YAML
Executable File
128 lines
2.7 KiB
YAML
Executable File
services:
|
|
webserver:
|
|
image: nginx:1.27.2
|
|
volumes:
|
|
- ./:/var/www
|
|
- ./_docker/nginx/${NGINX_ENV}/conf.d/:/etc/nginx/conf.d/
|
|
- /etc/letsencrypt:/etc/letsencrypt
|
|
- /var/www/certbot:/var/www/certbot
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
container_name: ntspi-nginx
|
|
restart: always
|
|
depends_on:
|
|
- app
|
|
env_file:
|
|
- .env
|
|
networks:
|
|
- app-network
|
|
|
|
certbot:
|
|
image: certbot/certbot
|
|
container_name: ntspi-certbot
|
|
volumes:
|
|
- /etc/letsencrypt:/etc/letsencrypt
|
|
- /var/www/certbot:/var/www/certbot
|
|
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
|
|
depends_on:
|
|
- webserver
|
|
networks:
|
|
- app-network
|
|
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: _docker/app/Dockerfile
|
|
volumes:
|
|
- ./:/var/www
|
|
container_name: ntspi-php
|
|
restart: always
|
|
ports:
|
|
- "5173"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
networks:
|
|
- app-network
|
|
dns:
|
|
- 8.8.8.8 # Google DNS
|
|
- 1.1.1.1 # Cloudflare DNS
|
|
|
|
php-queue-worker:
|
|
restart: always
|
|
build:
|
|
context: .
|
|
dockerfile: _docker/app/Dockerfile
|
|
volumes:
|
|
- ./:/var/www
|
|
container_name: ntspi-php-queue
|
|
command: php artisan queue:work --queue=analytics,default --tries=3 --timeout=90 --sleep=3
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
networks:
|
|
- app-network
|
|
dns:
|
|
- 8.8.8.8 # Google DNS
|
|
- 1.1.1.1 # Cloudflare DNS
|
|
|
|
db:
|
|
image: mysql:8.0
|
|
restart: always
|
|
container_name: ntspi-db
|
|
volumes:
|
|
- "./sourcefiles/mysql:/var/lib/mysql"
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD=secret
|
|
- MYSQL_DATABASE=ntspi_db
|
|
- MYSQL_USER=admin
|
|
- MYSQL_PASSWORD=secret
|
|
ports:
|
|
- "3306:3306"
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 10
|
|
networks:
|
|
- app-network
|
|
|
|
redis-cache:
|
|
image: redis:7.4.2
|
|
restart: always
|
|
container_name: ntspi-cache-service
|
|
ports:
|
|
- "6379:6379"
|
|
command: redis-server --save 20 1 --loglevel warning
|
|
volumes:
|
|
- cache:/data
|
|
networks:
|
|
- app-network
|
|
|
|
jenkins:
|
|
build:
|
|
context: .
|
|
dockerfile: _docker/jenkins/Dockerfile
|
|
container_name: ntspi-jenkins
|
|
restart: always
|
|
user: root
|
|
volumes:
|
|
- jenkins_data:/var/jenkins_home
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ./:/var/www
|
|
environment:
|
|
- DOCKER_HOST=unix:///var/run/docker.sock
|
|
- JENKINS_OPTS=--prefix=/jenkins
|
|
networks:
|
|
- app-network
|
|
|
|
volumes:
|
|
cache:
|
|
driver: local
|
|
jenkins_data:
|
|
driver: local
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge |