Comments (26)
Hi, I just stumbled on this repo while I was trying to dockerize piwik myself. I'm on a Mac here and I was getting some permissions problems with your setup so I made some edits to not mount directories back to my host. For example, - ./config:/var/www/html/config
became - /var/www/html/config
in my docker-compose.yml
. This fixed my permission errors.
Now I'm unclear how the database should be initialized. When I docker-compose up -d
, everything works, but now I'm asked to fill in my database information in the setup wizard and I never created a user or its password. Should I be creating this database manually or should I expect the docker-compose initialization to create it for me? It appears to be missing from the instructions.
from docker.
@bmoo thanks for your feedback!
Permission
What do you use to run docker on mac?
When you execute docker-compose
, are you inside the git repo?
What is exactly the error?
Database init
I just updated https://github.com/piwik/docker-piwik/blob/master/README.md#installation
Let me know if it isn't clearer :)
Thanks,
Pierre
from docker.
Hey @pierreozoux
I use vmware-fusion 8 and docker-machine with the boot2docker image. And I'm in the git repo when I run compose. Here's the output -
brad at compy in ~/dev/docker-piwik (master●)
$ docker-compose up -d
Creating dockerpiwik_db_1...
Creating dockerpiwik_app_1...
Cannot start container b246481140e7439a1f369965f320b6c6d5261f655a5caa5786600afb61cb89a4: Cannot link to a non running container: /dockerpiwik_db_1 AS /dockerpiwik_app_1/db
brad at compy in ~/dev/docker-piwik (master●)
$ docker logs dockerpiwik_db_1
chown: changing ownership of `/var/lib/mysql/': Operation not permitted
I didn't need the db volume mapped to my host so I removed the mapping (as I described earlier) and that fixed the permission problem. Then I ran docker-compose kill && docker-compose rm
to remove my old containers. Another docker-compose up -d
completes successfully but docker-compose logs
shows:
brad at compy in ~/dev/docker-piwik (master●●)
$ docker-compose logs
Attaching to dockerpiwik_cron_1, dockerpiwik_web_1, dockerpiwik_app_1, dockerpiwik_db_1
app_1 | tar: ./config/manifest.inc.php: Cannot change ownership to uid 1000, gid 1000: Operation not permitted
app_1 | tar: ./config/global.ini.php: Cannot change ownership to uid 1000, gid 1000: Operation not permitted
app_1 | tar: ./config/global.php: Cannot change ownership to uid 1000, gid 1000: Operation not permitted
app_1 | tar: ./config/environment/test.php: Cannot change ownership to uid 1000, gid 1000: Operation not permitted
app_1 | tar: ./config/environment/dev.php: Cannot change ownership to uid 1000, gid 1000: Operation not permitted
app_1 | tar: ./config/environment: Cannot change ownership to uid 1000, gid 1000: Operation not permitted
app_1 | tar: ./config: Cannot change ownership to uid 1000, gid 1000: Operation not permitted
app_1 | tar: Exiting with failure status due to previous errors
db_1 | Running mysql_install_db
...
Removing the ./config
host mount in the app container fixes this problem and then everything works. It seems likely that this is due to the fact that the uid/gid used by the container doesn't map to anything known by my host, but I haven't dug any further yet.
from docker.
One way to solve this might be to put these externalized files and folders in a data container that is built from the same base image as the rest. Then the uid/gids would be consistent between the app and its volume mount.
from docker.
Hum, thanks for your comment.
I never ran into this...
Do you use latest version of compose and docker?
from docker.
Yes
from docker.
I just installed Piwik with this image, worked great. 👍
from docker.
Thanks @jgillich for the feedback. And thanks @bmoo also!
It looks like everything is sorted out :)
from docker.
In my case this image worked flawlessly. In fact, I have built one temporal image for using it until having this real official one online (jaml/tmp-official-piwik).
Good job!
from docker.
Ok, I'll PR to official repo (probably beginning of next week)
from docker.
Is there a change to have an alpine version of this image? In large scale clusters, image size matters.
from docker.
This would be a nice to have indeed.
We could have 2 tags piwik and piwik-light.
I'd be glad to accept a PR to this repo, then we'll have to figure ot
how to organise.
(The size doesn't matter that much, I use debian for all my cluster, and
indeed, I just download piwik, but well, I agree, it is in general more
satisfying from an engineering point of view)
On 11-12-2015 11:49, José Moreira wrote:
Is there a change to have an alpine version of this image? In large
scale clusters, image size matters.—
Reply to this email directly or view it on GitHub
#1 (comment).
from docker.
@pierreozoux thanks for your response.
I'm gonna create an internal one and then an open-source one.
Is there a specific reason why you're dividing php-fpm
service from nginx
one?
from docker.
One service per container is a best practice.
On 16-12-2015 15:50, José Moreira wrote:
@pierreozoux thanks for your response.
I'm gonna create an internal one and then an open-source one.
Is there a specific reason why you're dividingphp-fpm
service fromnginx
one?
Reply to this email directly or view it on GitHub:
#1 (comment)
I use PGP to protect our privacy, if you want to know more, you can
follow this
https://emailselfdefense.fsf.org/en/
If you have further questions, please do not hesitate to ask.
You can verify my public key here: https://keybase.io/pierreozoux
from docker.
Yep, I know... 😞 But for scale them up separately I have to configure also confd
on the nginx
side, which invalidates the One service per container
practice, not to mention it would make it difficult to support different container-based service discoveries...
Seems that I'm gonna choose to build up the internal image with an HTTP endpoint instead.
By the way, IMHO, I think the way this image is accepting configurations (through volume file sharing) makes it hardener to deploy. That is the main reason that took me to build a new one instead.
from docker.
separate php-fpm from nginx is a little bit to much imo. if possible you also should not have to build your own image first. it should run with providing env vars and a separate mysql db. im working on a alpine version for a customer right now. im checking the official wordpress image for some ideas to get this work.
from docker.
We already bootstraped an alpine based docker image with s6 as supervisor. Unfortunately I dont have 100% sure if it has been completed since it wasn't implemented yet. Tomorrow, as soon as I get on my laptop I could confirm and release an OS one.
Enviado do meu telefone com Cyanogen
Em 02/01/2016 18:47, Mike [email protected] escreveu:
separate php-fpm from nginx is a little bit to much imo. if possible you also should not have to build your own image first. it should run with providing env vars and a separate mysql db. im working on a alpine version for a customer right now. im checking the official wordpress image for some ideas to get this work.
—
Reply to this email directly or view it on GitHub.
from docker.
checking this image it seems it's already pretty close to the wordpress one so changing it to
FROM php:5.6-apache
and starting it with apache2-foreground
gives you a pure piwik. imo the official image should just do it's job and be simple as possible to start. let the backup, ssh and other stuff be done by forks.
from docker.
@MikeMichel thanks for the feedback.
This image is already the simplest, it just serves the php.
And there is not ssh, where did you see that?
The Backup is just a tip for people who might want backup, but everybody is free to use it or not.
from docker.
saw ssh in another piwik image but i just wanted to say, that keeping the official images as clean as possible should be the way to go. however, in this case it is just about the prefered webserver which is here nginx so you create another container for fpm to avoid s3/supervisord while here i would pick apache as it is part of the official php repo .with the mentioned to small changes i now can do
db:
image: mysql
volumes:
- /volume/mysql/:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- MYSQL_USER=mysqluser
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=piwik
web:
image: mikemichel/piwik-apache
links:
- db
volumes:
- /volume/web:/var/www/html/
ports:
- 80:80
and i'm ready to go but that's just the way i would prefer. there are many ways to do it.
from docker.
Ok the official image is almost merged \o/
Then I'll make a blog post.
And then, we'll make it with apache and alpine.
As other pojects like ownCloud or WordPress, they offer different alternatives with the use of tags. We can have the same.
Once it is official image, I'll prepare the repo to have 3 different tags, and I'll ask you @MikeMichel and @cusspvz to PR for apache and alpine.
How do you like the idea?
from docker.
ah right, tags make sense. i can do a blogpost then on sloppy.io how to combine wordpress with piwik using official images only.
from docker.
Ah you work for sloppy.io :)
Nice :)
Yes, it would be awesome!
On 09-01-2016 10:40, Mike wrote:
ah right, tags make sense. i can do a blogpost then on sloppy.io how to combine wordpress with piwik using official images only.
Reply to this email directly or view it on GitHub:
#1 (comment)
I use PGP to protect our privacy, if you want to know more, you can
follow this
https://emailselfdefense.fsf.org/en/
If you have further questions, please do not hesitate to ask.
You can verify my public key here: https://keybase.io/pierreozoux
from docker.
Hi guys,
Interesting discussion.
Any update about official images deployment?
from docker.
@Toub getting closer every days :)
docker-library/official-images#1203 (comment)
from docker.
The official repo is PRed, so I close this issue.
from docker.
Related Issues (20)
- LoginSaml Logs that the response was recieved at a different endpoint
- difference in nginx template and docker template
- Tracking code verification failed. Please verify that you have installed the code correctly
- nginx config differs from official documentation
- Version 5.0.1 not updated after docker pull HOT 2
- Matomo Web UI doesn't recognize new Version
- LOAD DATA INFILE - warning that wasn't in versions before
- SSL Certificate Expiry Issue HOT 1
- docker version mamoto db connection failed with latest version of mariadb
- Does not work - Cannot connect to DB HOT 2
- Upgrading HOT 4
- Docker container stops after a day or two with message "caught SIGWINCH, shutting down gracefully"
- Add an environment variable to rename matomo.js and matomo.php
- Feature request: Don't compress Matomo within the container
- Feature request: Kubernetes-specific container HOT 1
- Getting error server reached MaxRequestWorkers HOT 1
- Increase max execution time
- Docker image vulnerabilities HOT 1
- [Bug] PHP 8.2 and 8.3 breaks the SSL connection to Matomo's database
- 5.1.1 build is broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker.