瀏覽代碼

run via new 'run-koel.sh'

Fabian Peter Hammerle 7 年之前
父節點
當前提交
6eff3cf482
共有 3 個文件被更改,包括 14 次插入6 次删除
  1. 4 2
      Dockerfile
  2. 4 4
      README.md
  3. 6 0
      run-koel.sh

+ 4 - 2
Dockerfile

@@ -27,5 +27,7 @@ RUN composer install --no-interaction
 
 
 RUN yarn install
 RUN yarn install
 
 
-# TODO use apache or nginx https://koel.phanan.net/docs/#/?id=manually
-CMD ["sh"]
+# TODO run as non-root
+COPY /run-koel.sh /
+EXPOSE 8080
+CMD ["/run-koel.sh"]

+ 4 - 4
README.md

@@ -16,10 +16,10 @@ $ sudo docker run --rm --interactive --tty \
     --env DB_PORT=5432 \
     --env DB_PORT=5432 \
     --env DB_DATABASE=koel \
     --env DB_DATABASE=koel \
     --env DB_PASSWORD=secret \
     --env DB_PASSWORD=secret \
-    --network koel --publish=8000:8000 \
+    --network koel --publish=8080:8080 \
     --security-opt=no-new-privileges --cap-drop=all \
     --security-opt=no-new-privileges --cap-drop=all \
     koel
     koel
-/koel # php artisan koel:init
++ php artisan koel:init
 ...
 ...
 App key exists -- skipping
 App key exists -- skipping
 Generating JWT secret
 Generating JWT secret
@@ -61,8 +61,8 @@ Again, for more configuration guidance, refer to
 📙  https://koel.phanan.net/docs
 📙  https://koel.phanan.net/docs
 or open the .env file in the root installation folder.
 or open the .env file in the root installation folder.
 Thanks for using Koel. You rock!
 Thanks for using Koel. You rock!
-/koel # php artisan serve --host=0.0.0.0
-Laravel development server started: <http://0.0.0.0:8000>
++ php artisan serve '--host=0.0.0.0' --port 8080
+Laravel development server started: <http://0.0.0.0:8080>
 PHP 7.2.10 Development Server started at Sat Sep 15 19:41:27 2018
 PHP 7.2.10 Development Server started at Sat Sep 15 19:41:27 2018
 [Sat Sep 15 19:41:30 2018] 172.18.0.1:35448 [200]: /public/css/app.088d4f5eca71efdd5ffc.css
 [Sat Sep 15 19:41:30 2018] 172.18.0.1:35448 [200]: /public/css/app.088d4f5eca71efdd5ffc.css
 ...
 ...

+ 6 - 0
run-koel.sh

@@ -0,0 +1,6 @@
+set -ex
+
+php artisan koel:init
+
+# TODO use apache or nginx https://koel.phanan.net/docs/#/?id=manually
+php artisan serve --host=0.0.0.0 --port 8080