Skip to content

Commit

Permalink
Introduce matomo logs container
Browse files Browse the repository at this point in the history
  • Loading branch information
pdavide committed May 29, 2023
1 parent 9704c93 commit 03d163c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
<exec command="docker-compose up -d --build nginx mariadb redis ipa-redisearch elasticsearch php-fpm matomo" dir="containers" passthru="true" checkreturn="true"/>
</then>
<else>
<exec command="docker-compose up -d --build nginx mariadb redis ipa-redisearch mailhog php-fpm matomo queue-worker elasticsearch spid-testenv" dir="containers" passthru="true" checkreturn="true"/>
<exec command="docker-compose up -d --build nginx mariadb redis ipa-redisearch mailhog php-fpm matomo matomo-logs queue-worker elasticsearch spid-testenv" dir="containers" passthru="true" checkreturn="true"/>
<if>
<or>
<equals arg1="${REDIS_INDEXES_USE_SENTINELS}" arg2="true"/>
Expand Down Expand Up @@ -576,7 +576,7 @@
<available file="containers" type="dir" property="ignored"/>
<then>
<echo msg="Starting Docker containers..."/>
<exec command="docker-compose up -d nginx mariadb redis ipa-redisearch mailhog php-fpm queue-worker elasticsearch spid-testenv" dir="containers" passthru="true" checkreturn="true"/>
<exec command="docker-compose up -d nginx mariadb redis ipa-redisearch mailhog php-fpm matomo-logs queue-worker elasticsearch spid-testenv" dir="containers" passthru="true" checkreturn="true"/>
<echo msg="Web Analytics Italia up and running!"/>
</then>
</if>
Expand Down
13 changes: 12 additions & 1 deletion containers/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ volumes:
driver: local
matomo-install:
driver: local
matomo-logs:
driver: local
mariadb-data:
driver: local
elasticsearch-data:
Expand All @@ -35,7 +37,7 @@ services:
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ${APP_LOGS_PATH_HOST}/php:${APP_LOGS_PATH_CONTAINER}/php
- ${APP_LOGS_PATH_HOST}/matomo:${APP_LOGS_PATH_CONTAINER}/matomo
- matomo-logs:${APP_LOGS_PATH_CONTAINER}/matomo
- matomo:/opt/matomo/
# - ./matomo/wai-matomo-theme/dist/WAIMatomoTheme:/opt/matomo/plugins/WAIMatomoTheme
expose:
Expand Down Expand Up @@ -165,6 +167,15 @@ services:
networks:
- backend

# matomo-logs
matomo-logs:
image: alpine
command: sh -c "touch ${APP_LOGS_PATH_CONTAINER}/matomo/matomo.log; tail -f ${APP_LOGS_PATH_CONTAINER}/matomo/matomo.log"
volumes:
- matomo-logs:${APP_LOGS_PATH_CONTAINER}/matomo
networks:
- backend

# redis
redis:
image: redislabs/redisearch:latest
Expand Down

0 comments on commit 03d163c

Please sign in to comment.