diff --git a/.github/docker/entrypoint.sh b/.github/docker/entrypoint.sh index d3b891de6..5590102b2 100644 --- a/.github/docker/entrypoint.sh +++ b/.github/docker/entrypoint.sh @@ -42,6 +42,13 @@ php artisan migrate --force echo -e "Starting cron jobs." crond -L /var/log/crond -l 5 +if [[ -z $SKIP_CADDY ]]; then + echo "Starting PHP-FPM and Caddy" + caddy run --config /etc/caddy/Caddyfile --adapter caddyfile & +else + echo "Starting PHP-FPM only" +fi + #chmod -R 755 storage/* bootstrap/cache/ chown -R www-data:www-data . diff --git a/Dockerfile b/Dockerfile index 57d388812..350388f15 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,7 +50,7 @@ EXPOSE 443 VOLUME /pelican-data # Start PHP-FPM -CMD ["sh", "-c", "php-fpm & caddy run --config /etc/caddy/Caddyfile --adapter caddyfile"] +CMD ["sh", "-c", "php-fpm"] ENTRYPOINT [ "/bin/ash", ".github/docker/entrypoint.sh" ] # CMD [ "supervisord", "-n", "-c", "/etc/supervisord.conf" ] diff --git a/compose.yml b/compose.yml index c4737d755..e4d737cbe 100644 --- a/compose.yml +++ b/compose.yml @@ -1,7 +1,7 @@ x-common: panel: &panel-environment - APP_URL: "https://localhost" + APP_URL: "https://localhost" # can be set to 'http://localhost' to un on port 80 only APP_DEBUG: "false" ADMIN_EMAIL: "USEYOUROWNEMAILHERE@example.com" @@ -29,19 +29,23 @@ x-common: services: panel: - image: panel + image: ghcr.io/pelican-dev/panel:latest restart: always + networks: + - default ports: - - "80:2019" + - "80:80" - "443:443" + # - "9000:9000" # enable when not using caddy to be abel to reach php-fpm extra_hosts: - - "host.docker.internal:host-gateway" + - "host.docker.internal:host-gateway" # shows the panel on te internal docker network as well. usually '172.17.0.1' volumes: - pelican-data:/pelican-data - pelican-logs:/var/www/html/storage/logs environment: <<: [*panel-environment, *mail-environment] XDG_DATA_HOME: /pelican-data + # SKIP_CADDY: true # enable when not using caddy. volumes: pelican-data: