mirror of
https://github.com/koel/koel.git
synced 2026-04-25 08:46:00 +03:00
[GH-ISSUE #10] Create a docker image #8
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SkinyMonkey on GitHub (Dec 14, 2015).
Original GitHub issue: https://github.com/koel/koel/issues/10
I don't have experience with the PHP ecosystem so I might have some problem doing it but if you help me It should be easy/quick to do.
Contact me!
@sammcj commented on GitHub (Dec 14, 2015):
+1
@reyman commented on GitHub (Dec 14, 2015):
👍
@risq commented on GitHub (Dec 14, 2015):
👍
@eladg commented on GitHub (Dec 14, 2015):
+1
@n2o commented on GitHub (Dec 14, 2015):
A docker container would be awesome!
@sg-s commented on GitHub (Dec 14, 2015):
+1
@ColmHally commented on GitHub (Dec 14, 2015):
I like this project and would be happy to contribute a Docker image later tonight, unless someone else has started already?
@LuRsT commented on GitHub (Dec 14, 2015):
@ColmHally I was planning on doing it too, but since you stepped up first, go ahead :)
@ColmHally commented on GitHub (Dec 14, 2015):
@LuRsT ha! Ok - when I've got something, would you mind reviewing? I'll probably add a
docker-compose.ymlfile as well so the mysql dependency is in a separate container.@LuRsT commented on GitHub (Dec 14, 2015):
@ColmHally Sounds good! Yes, using docker compose is a good idea :)
@NamPNQ commented on GitHub (Dec 14, 2015):
I'm current doing it 💃
@ColmHally commented on GitHub (Dec 14, 2015):
@NamPNQ cool!
@w0rd-driven commented on GitHub (Dec 14, 2015):
Since this is a laravel project you can use homestead, the preconfigured vagrant environment. Basic docs are here: http://laravel.com/docs/5.1/homestead.
I'd personally choose the Per Project Installation (http://laravel.com/docs/5.1/homestead#per-project-installation), run
homestead make, and include the definitions in the repo.I know this is specifically a docker thread but if you have no preference between docker and vagrant, the homestead VM is already setup to host laravel projects.
@LuRsT commented on GitHub (Dec 14, 2015):
@w0rd-driven they both have their advantages and disadvantages, the project could support both if @phanan accepts.
@wmartins commented on GitHub (Dec 14, 2015):
+1
@dellingera commented on GitHub (Dec 14, 2015):
+1
@mpgirro commented on GitHub (Dec 14, 2015):
+1
@Lusitaniae commented on GitHub (Dec 14, 2015):
sounds interesting, can I see it as well?
Maybe I can give a hand
@telemakhos commented on GitHub (Dec 14, 2015):
+1
@samliu commented on GitHub (Dec 14, 2015):
+1
@extensionsapp commented on GitHub (Dec 14, 2015):
+1
@kodeartisan commented on GitHub (Dec 15, 2015):
+1
@hernandanielg commented on GitHub (Dec 15, 2015):
I would be happy to create a Vagrant and a docker image, but Idk if we will end doing the same thing at the same time... Someone could help me because I'm new here 🚶
@phanan commented on GitHub (Dec 15, 2015):
@NamPNQ commented on GitHub (Dec 15, 2015):
Hi friends,
I create branch for docker in here: https://github.com/NamPNQ/koel/tree/feature-docker
How to install via docker
Config admin info and db info
Run docker
It's done,..but i get error in larevel, i don't familar with larevel to solve it, anyone can help me to continue
@phanan commented on GitHub (Dec 15, 2015):
@NamPNQ You need to run
php artisan key:generateto generate a key. But scratch that, @mattstauffer has added aphp artisan initto coverkey:generatemigrateanddb:seed. Please refer to the updated wiki.@NamPNQ commented on GitHub (Dec 15, 2015):
@phanan: I got my mistake, I set
.envto enviroment, and when run app it not get in.env, it get in enviroment 💃@sammcj commented on GitHub (Dec 15, 2015):
Thanks @NamPNQ , any chance you could swap out Apache for Nginx?
Generally Nginx is faster, lighter weight and more secure than Apache these days.
@NamPNQ commented on GitHub (Dec 15, 2015):
@samliu Waiting #7 closed 👍
@phanan commented on GitHub (Dec 15, 2015):
I don't think this is proper.
www-dataphp artisan key:generateshould be replaced byphp artisan initphp artisan config:clearwhy do we need this?@sammcj commented on GitHub (Dec 15, 2015):
I'd suggest using the official PHP 7 FPM docker image as a base, then adding nginx and connecting to PostgreSQL to try and do away with MySQL / MariaDB.
github.com/docker-library/php@a9f7fed15b/7.0/fpm/Dockerfile@NamPNQ commented on GitHub (Dec 15, 2015):
@phanan:
Composer should be run by www-data, fixed, i will pull request soonphp artisan config:clear, i had remove itphp artisan initinclude migrate db, but when build docker image is not link with db, we should be manual run it@CedricGatay commented on GitHub (Dec 15, 2015):
You can also have a look at this https://github.com/CedricGatay/docker-koel, it is still a little rough around the edges and I hope to have enough time to clean it up before submitting a proper pull request (if nobody does it before me).
@patrick-mota commented on GitHub (Dec 15, 2015):
I just started from alpine and I saw your issue..
I started from https://github.com/geshan/docker-php-composer-alpine/blob/master/Dockerfile to get php+composer from alpine as base.
And there is my Dockerfile... it was my first draft so some elements can be removed.
Anyway if you go with alpine don't forget to "apk add build-base" or you will be unable to npm install.
FROM geshan/php-composer-alpine:latest
RUN apk --update add php-mysql php-pdo_mysql php-mcrypt php-ctype php-xml python &&
apk add nodejs &&
apk add git &&
apk add build-base &&
rm /var/cache/apk/*
RUN git clone https://github.com/phanan/koel &&
cd koel &&
npm install &&
composer install
COPY config/.env .
RUN php artisan init &&
php artisan serve
@jc21 commented on GitHub (Dec 15, 2015):
Definitely voting for a docker instance for this project. I have a docker image someone might be interested in as a base for these types of apps.
https://hub.docker.com/r/jc21/devserver/
Copy and modify the dockerfile specifically for this app. Unfortunately I don't have the time atm.
@NamPNQ commented on GitHub (Dec 16, 2015):
Hey @CedricGatay, @patrick-mota , It look like docker for dev enviroment, I think it not necessary
@phanan commented on GitHub (Dec 16, 2015):
@CedricGatay Can you update your docker with Apache + PHP 7?
@CedricGatay commented on GitHub (Dec 16, 2015):
@NamPNQ I am not a php dev so I don't know if laravel built in server is slow or something else. But I disagree on this being a dev environment : it would have less layers and code mounted as a volume instead of being integrated in the build.
@phanan if you think it can be better in term of performance, I can do this change (not until tomorrow I'm afraid though)
@NamPNQ commented on GitHub (Dec 16, 2015):
@CedricGatay I mean
php artisan serveis not ment for use in production environments because it uses PHP5 build in webserver. Just serve app via Apache or Nginx.@CedricGatay commented on GitHub (Dec 16, 2015):
@NamPNQ OK sorry I didn't understand your comment this way. I will have a look but if you have time and the knowledge, a pull request is welcome ;)
@etopian commented on GitHub (Dec 16, 2015):
https://github.com/etopian/docker-koel
@phanan commented on GitHub (Dec 16, 2015):
@etopian This looks great!
@Cotix commented on GitHub (Dec 17, 2015):
@etopian Why not include the database in the image aswell?
@etopian commented on GitHub (Dec 17, 2015):
@Cotix I run 25 websites on my server. i don't want to run 25 db instances. just use any mysql/mariadb database image. i bind port 3306 to the first IP in Docker's subnet range, 172.17.0.1, so it's accessible to all containers. it's trivial to add an db to the container though, just fork and add it.
@SkinyMonkey commented on GitHub (Dec 18, 2015):
@Cotix it's generally a bad practice in docker, if you lose your container you lose your data.
@etopian nice one, why didn't you use a link instead?
@etopian commented on GitHub (Dec 18, 2015):
@SkinyMonkey don't like the concept of strongly coupled things, if you want to upgrade your database how do you do that with 25 sites linked to the db container. docker says you should use an ambassador container, but that just seems like too much complexity. my way of doing it is nice and simple and lets me upgrade the database container anytime i want. i mount the database data dir from the host so that never goes away.
@SkinyMonkey commented on GitHub (Dec 18, 2015):
Mmh, in this particular context I don't imagine people launching 25 instance of koei but ok ;)
@etopian commented on GitHub (Dec 18, 2015):
@SkinyMonkey btw if you want to link a container you can do it with this image.. just specify the link as the DB_HOST... i.e. -v DB_HOST=mysql
@kevincaradant commented on GitHub (Dec 20, 2015):
Hi everyone
Maybe someone will be able to help me about docker. I try to create a docker image for arm support. It's the first time, i look docker so i'm currently learning , i look the etopian Dockerfile and NamPNQ Dockerfile also. For the moment, i stay on Apache and mysql. I want to connect my docker image (koel) with my dokcer image (mysql) . Is it a good practice or not ? .
For my docker koel , this is my first Dockerfile version :
My .env file :
So how to know the IP from mysql:5.6 image ? How to link this database with koel image ?
After my second docker image is just the mysql docker that i have init like this :
sudo docker run -i -t -e MYSQL_ROOT_PASSWORD=my_pass mysql:5.6docker exec -it 360b4e5b246f bashand write this :
mysql> CREATE DATABASE koel DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;mysql>CREATE USER 'koel-db-user'@'localhost' IDENTIFIED BY 'koel-pass';mysql> GRANT ALL PRIVILEGES ON koel.* TO 'koel-db-user'@'localhost' WITH GRANT OPTION;PS: In this case i used an image no arm because i lost all my last day to build just 4 times, that ask so much time and RAM ... so when it's good with intel64bits , i will adapt for my arm version :).
Thank you for your help guys, i know it's not your first task in your list but that will be very nice for me ;)
@CedricGatay commented on GitHub (Dec 20, 2015):
@kevincaradant Hi,
I think your image contains unnecessary things (nginx/apache but you're running it with php).
For a x86 working image, take a look at my repository (https://github.com/CedricGatay/docker-koel) and use the docker-compose file to be up and running.
But as you're running under arm, I guess you will need to change the FROM for my dockerfile as well as pick a mysql/mariadb compatible image.
@kevincaradant commented on GitHub (Dec 20, 2015):
Thank you @CedricGatay , i like your repo simple. It's very interesting.
So i replace that :
RUN apt-get update \ && apt-get install aufs-tools apache2 net-tools apt-utils php5-mysql python dialog php5 g++ git curl automake build-essential bash less vim ca-certificates zlibc zlib1g zlib1g-dev -y \By that :
RUN apt-get update \ && apt-get -y -q install aufs-tools net-tools apt-utils python bash g++ git curl automake php5 dialog php5-cli php5-mysql git curl build-essential\I deleted apache and user nginx.
My new Dockerfile very silimar with yours ^^ :
After i see, you use something that i didn't understand before "docker-compose" .
I get yours but in "links" you have db:db . What is it ? i replace by what ?
After if i understand, i have to realize this :
docker build -i -t my_koel_arm .that execute my Dockerfile that i defined
Then :
docker-compose up -d db; sleep 60; docker-compose up -d app;i don't understand option and what replace. what is the flag "-d" , i didn't see in the document docker-compose. :/. is it this , which link mysql image with koel image ?Thank you for all after that , a lot of things will be more clear for me :D
@CedricGatay commented on GitHub (Dec 20, 2015):
@kevincaradant I think you need to read more of docker documentation. In fact the docker link feature is used to link container. My
db:dbline does the link automatically between mydbservice (_:db) as adbhost (db:_) when myappcontainer is ran.With compose you don't need to run your docker file manually, but you only have to run via compose (the
-dflag makes the container go to the background).To use the repository I gave you, you only need to symlink your music to the proper folder and everything should be working (perhaps some improvements are possible by using apache or nginx instead of php though)
@kevincaradant commented on GitHub (Dec 20, 2015):
ohh oki thank you for this information , i'm going to learn more about this subject, , i ask you, just a last question; I'm trying to use your repo . But i get this question with your command (maybe i'm stupid but i think, you don't give me the solution about this ) :
What need to mention ? Thank you
Edit : it was just a problem of rights ... sudo fix it.... sorry for this useless question
@CedricGatay commented on GitHub (Dec 20, 2015):
@kevincaradant add your user to the docker group (
sudo usermod -aG docker $(whoami)) to get rid of sudoing every docker command.I updated my docker image to use php7 with apache2 (cc @phanan). Feel free to take a look at it.
@kevincaradant commented on GitHub (Dec 20, 2015):
yep i watch your repo very often, i see your update but i was still to understand your first commit :) , i will check that tomorrow now i know the base of docker. Thank you @CedricGatay :) and ok for the command about rights ;)
@jommgoncalves commented on GitHub (Dec 23, 2015):
+1
For now, I only want test it. The list of dependencies is incredible!
@kevincaradant commented on GitHub (Dec 24, 2015):
i think i'm not so far to success, but in the moment that does not work... this is my repo inspired by existing repo on docker : https://github.com/kevincaradant/armhf_docker_koel/tree/dev , even the readme is not changed ^^, . It's for intel but i can easily trnsform it for arm that why i like my repo. If someone can help me about config because i get this error in : /DATA/htdocs/storage/logs/laravel.log
i don't know what can i change . But when i see that :
mysql:host=;dbnthat seem let to think that the variables are unknown inside the docker no ? thank you very much :) and sorry to invade the thread with my problem ;)@Qeole commented on GitHub (Jan 17, 2016):
Hi there!
Just in case it could help someone, I run @etopian's koel Docker image and wrote a tutorial on the steps I executed to make it work. Available there: https://blog.qoba.lt/koel_with_docker.html
@jee-r commented on GitHub (Jan 18, 2016):
Thx @Qeole for this tuto, Thx @phanan for koel and @etopian for the dockerfile.
What about the lastfm feature ? is this in the todo-list
@etopian commented on GitHub (Jan 18, 2016):
@Qeole your page has been referenced by my Docker image. Thanks for the writeup.
@NamPNQ commented on GitHub (Jan 18, 2016):
@Qeole try using docker compose for simple setup :D
@Qeole commented on GitHub (Jan 18, 2016):
@NamPNQ Thanks, I'll have a look at it!
@etopian that's neat! Thanks
@phanan commented on GitHub (Jan 31, 2016):
I guess any of you can come up with a custom docker now, no need for an "official" kind of. Closing this to clean the list.
@maxengel commented on GitHub (Jul 16, 2017):
@etopian Thanks for creating this! Everything goes fine, but upon first run, the media path in "Settings" is empty, despite setting it when getting the container setup. I can change it to /DATA/music and can confirm via the CLI that it sees the music, but scanning doesn't seem to work. Any ideas?