Kapeli / Dash-Annotations

The source code for the Dash annotations server
MIT License
117 stars 12 forks source link

Direct Docker usage instead of Dokku ? #3

Closed solidnerd closed 9 years ago

solidnerd commented 9 years ago

Hey, i guess i would be easier to use Docker with docker-compose instead of dokku-alt. Have you tried it ?

Kapeli commented 9 years ago

I'm a complete novice when it comes to web stuff and Docker/Dokku/whatever, so no idea. Dokku support was added in https://github.com/Kapeli/Dash-Annotations/pull/2 by @jpscharf. Feel free to make a pull request to add support for Docker.

outcoldman commented 9 years ago

@SolidNerd @Kapeli I tried to setup Docker image with Dash annotations, but I failed on the routing for the Lumen. I have 0 knowledge of php, so if you can help me - that will be awesome.

This is the repo https://github.com/outcoldman/docker-dash-annotations

This is example of docker-compose file https://github.com/outcoldman/docker-dash-annotations/blob/master/docker-compose.yml.example

It is important to specify GitHub Auth token for this image (which can be generated here https://github.com/settings/tokens) because composer is making a lot of requests to the GitHub server.

The problem which I cannot solve is the routing. I have apache rewrite module enabled. If I will remove these lines https://github.com/outcoldman/docker-dash-annotations/blob/master/Dockerfile#L25-L28 from Dockerfile (these lines overrides Lumen with Dash-Annotations server) and if I add server.php inside the /etc/apache2/apache2.conf I can get to the Lumen homepage.

So the question are - what should be default configuration settings for the Lumen in Apache2?

If I will not be able to set it up with Apache - I will try to use nginx + fpm

Kapeli commented 9 years ago

Not sure about Apache (I use nginx), but either way I think what you need is the stuff at the "Pretty URLs" section of http://lumen.laravel.com/docs/installation.

outcoldman commented 9 years ago

@Kapeli this is where I got confused, because your/lumen public/.htaccess already has it. And I tried to mix it differently, it just did not work. I will try to switch to nginx as well.

solidnerd commented 9 years ago

@outcoldman @Kapeli Sorry for the late response. So i will give my two cents now. I tried to run it with Docker, but i got problems with Fastcgi of PHP-FPM and i guess i will later have the problem with the rewrite of the URL's. I build the php from hand on an alpine image. In the foreground i have a standalone Nginx that is used as reverse proxy for the PHP-FPM.

Here is a list of my components:

I'm not so familiar with php aswell. I hope we can figure it out together.

solidnerd commented 9 years ago

I got it to work.I doesn't have to change my Setup. I will update it asap.

outcoldman commented 9 years ago

@SolidNerd nice!

@Kapeli btw, could you tell us what needs to be backed up? Only DB? Anything in the storage folder?

Kapeli commented 9 years ago

Only the DB is fine. The storage folder is just used for storing sessions (in storage/framework/sessions), so if you don't back it up it's okay-ish - it will just cause everyone to log out.

solidnerd commented 9 years ago

So i made a Pull Request. Try it out :) https://github.com/Kapeli/Dash-Annotations/pull/6 . I hope it's comprehensible. Feel free to ask , if it's not.