Coder Social home page Coder Social logo

Comments (26)

bmoo avatar bmoo commented on August 29, 2024

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.

pierreozoux avatar pierreozoux commented on August 29, 2024

@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.

bmoo avatar bmoo commented on August 29, 2024

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.

bmoo avatar bmoo commented on August 29, 2024

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.

pierreozoux avatar pierreozoux commented on August 29, 2024

Hum, thanks for your comment.
I never ran into this...
Do you use latest version of compose and docker?

from docker.

bmoo avatar bmoo commented on August 29, 2024

Yes

from docker.

jgillich avatar jgillich commented on August 29, 2024

I just installed Piwik with this image, worked great. 👍

from docker.

pierreozoux avatar pierreozoux commented on August 29, 2024

Thanks @jgillich for the feedback. And thanks @bmoo also!

It looks like everything is sorted out :)

from docker.

j-a-m-l avatar j-a-m-l commented on August 29, 2024

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.

pierreozoux avatar pierreozoux commented on August 29, 2024

Ok, I'll PR to official repo (probably beginning of next week)

from docker.

cusspvz avatar cusspvz commented on August 29, 2024

Is there a change to have an alpine version of this image? In large scale clusters, image size matters.

from docker.

pierreozoux avatar pierreozoux commented on August 29, 2024

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.

cusspvz avatar cusspvz commented on August 29, 2024

@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.

pierreozoux avatar pierreozoux commented on August 29, 2024

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 dividing php-fpm service from nginx 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.

cusspvz avatar cusspvz commented on August 29, 2024

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.

MikeMichel avatar MikeMichel commented on August 29, 2024

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.

cusspvz avatar cusspvz commented on August 29, 2024

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.

MikeMichel avatar MikeMichel commented on August 29, 2024

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.

MikeMichel@9385a2b

from docker.

pierreozoux avatar pierreozoux commented on August 29, 2024

@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.

MikeMichel avatar MikeMichel commented on August 29, 2024

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.

pierreozoux avatar pierreozoux commented on August 29, 2024

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.

MikeMichel avatar MikeMichel commented on August 29, 2024

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.

pierreozoux avatar pierreozoux commented on August 29, 2024

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.

Toub avatar Toub commented on August 29, 2024

Hi guys,

Interesting discussion.
Any update about official images deployment?

from docker.

pierreozoux avatar pierreozoux commented on August 29, 2024

@Toub getting closer every days :)
docker-library/official-images#1203 (comment)

from docker.

pierreozoux avatar pierreozoux commented on August 29, 2024

The official repo is PRed, so I close this issue.

from docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.