mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
fix docker errors
This commit is contained in:
11
Dockerfile
11
Dockerfile
@ -13,11 +13,15 @@ RUN apt-get update && apt-get install -y \
|
||||
libxml2-dev \
|
||||
zip \
|
||||
unzip \
|
||||
libzip-dev
|
||||
libzip-dev \
|
||||
libmagickwand-dev
|
||||
|
||||
# Clear cache
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pecl install imagick \
|
||||
&& docker-php-ext-enable imagick
|
||||
|
||||
# Install PHP extensions
|
||||
RUN docker-php-ext-install pdo_mysql mbstring zip exif pcntl bcmath gd
|
||||
|
||||
@ -33,8 +37,3 @@ RUN mkdir -p /home/$user/.composer && \
|
||||
WORKDIR /var/www
|
||||
|
||||
USER $user
|
||||
|
||||
# COPY ./docker-compose/setup.sh /tmp
|
||||
# RUN ln -s /usr/local/bin/setup.sh
|
||||
|
||||
# ENTRYPOINT ["/tmp/setup.sh"]
|
||||
|
||||
@ -54,20 +54,11 @@
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"scripts": {
|
||||
"initial-setup": [
|
||||
"test -f .env || (cp .env.example .env; php artisan key:generate 2>/dev/null; exit 0)"
|
||||
],
|
||||
"pre-install-cmd": [
|
||||
"@initial-setup"
|
||||
],
|
||||
"pre-update-cmd": [
|
||||
"@initial-setup"
|
||||
],
|
||||
"post-root-package-install": [
|
||||
"@initial-setup"
|
||||
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
],
|
||||
"post-create-project-cmd": [
|
||||
"@initial-setup"
|
||||
"php artisan key:generate --ansi"
|
||||
],
|
||||
"post-autoload-dump": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
|
||||
@ -9,7 +9,6 @@ services:
|
||||
context: ./
|
||||
dockerfile: Dockerfile
|
||||
image: crater-php
|
||||
container_name: crater-app
|
||||
restart: unless-stopped
|
||||
working_dir: /var/www/
|
||||
volumes:
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /var/www
|
||||
docker-compose exec app composer install --no-interaction --prefer-dist --optimize-autoloader
|
||||
|
||||
php artisan storage:link || true
|
||||
php artisan key:generate
|
||||
php artisan passport:keys || true
|
||||
docker-compose exec app php artisan storage:link || true
|
||||
docker-compose exec app php artisan key:generate
|
||||
docker-compose exec app php artisan passport:keys || true
|
||||
Reference in New Issue
Block a user