mirror of
https://github.com/demostf/setup
synced 2026-06-04 00:54:07 +02:00
Add piwik
This commit is contained in:
parent
31aaf6909f
commit
45964e1450
2 changed files with 50 additions and 0 deletions
|
|
@ -11,15 +11,20 @@ services:
|
|||
- "./api.tmpl:/etc/nginx/conf.d/api.tmpl"
|
||||
- "./static.tmpl:/etc/nginx/conf.d/static.tmpl"
|
||||
- "./sync.tmpl:/etc/nginx/conf.d/sync.tmpl"
|
||||
- "./piwik.tmpl:/etc/nginx/conf.d/piwik.tmpl"
|
||||
- "${DEMO_ROOT}:/demos"
|
||||
volumes_from:
|
||||
- piwik
|
||||
environment:
|
||||
- HOST=${HOST}
|
||||
- UPLOAD_FASTCGI=api:9000
|
||||
- UPLOAD_SCRIPT=/app/src/public/upload.php
|
||||
networks:
|
||||
- proxy-tier
|
||||
- piwik-tier
|
||||
depends_on:
|
||||
- api
|
||||
- piwik
|
||||
api:
|
||||
image: demostf/api
|
||||
container_name: api
|
||||
|
|
@ -68,10 +73,33 @@ services:
|
|||
networks:
|
||||
- db-tier
|
||||
|
||||
piwik-db:
|
||||
image: mysql
|
||||
container_name: piwik-db
|
||||
volumes:
|
||||
- ./piwik_db_data:/var/lib/mysql
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
|
||||
networks:
|
||||
- piwik-db-tier
|
||||
|
||||
piwik:
|
||||
image: piwik:fpm
|
||||
container_name: piwik
|
||||
links:
|
||||
- db
|
||||
volumes:
|
||||
- ./piwik_config:/var/www/html/config
|
||||
networks:
|
||||
- piwik-db-tier
|
||||
- piwik-tier
|
||||
|
||||
networks:
|
||||
proxy-tier:
|
||||
db-tier:
|
||||
parser-tier:
|
||||
piwik-tier:
|
||||
piwik-db-tier:
|
||||
|
||||
volumes:
|
||||
certs:
|
||||
|
|
|
|||
22
piwik.tmpl
Normal file
22
piwik.tmpl
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name piwik.${HOST};
|
||||
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
|
||||
# root /usr/share/nginx/html;
|
||||
root /var/www/html/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass piwik:9000;
|
||||
fastcgi_param SCRIPT_FILENAME ${DOLLAR}document_root${DOLLAR}fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_NAME ${DOLLAR}fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue