diff --git a/tastyigniter/docker-compose.yml b/tastyigniter/docker-compose.yml index a69f7f5..f7d06f2 100644 --- a/tastyigniter/docker-compose.yml +++ b/tastyigniter/docker-compose.yml @@ -30,8 +30,8 @@ services: # Scheduler and Queue - QUEUE_CONNECTION=database volumes: - - ./:/var/www/html - - ./storage:/var/www/html/storage + - tastyigniter:/var/www/html + - tastyigniter-storage:/var/www/html/storage depends_on: - db networks: @@ -44,8 +44,8 @@ services: # ports: # - "80:80" volumes: - - ./:/var/www/html - - ./docker/nginx:/etc/nginx/conf.d + - tastyigniter:/var/www/html + - ./docker/nginx/site.conf:/etc/nginx/conf.d/default.conf depends_on: - app networks: @@ -73,7 +73,7 @@ services: restart: unless-stopped command: bash -c "while true; do php /var/www/html/artisan schedule:run --verbose --no-interaction; sleep 60; done" volumes: - - ./:/var/www/html + - tastyigniter:/var/www/html depends_on: - app networks: @@ -87,7 +87,7 @@ services: restart: unless-stopped command: php /var/www/html/artisan queue:work volumes: - - ./:/var/www/html + - tastyigniter:/var/www/html depends_on: - app networks: @@ -95,6 +95,8 @@ services: volumes: dbdata: + tastyigniter: + tastyigniter-storage: networks: tastyigniter-network: diff --git a/tastyigniter/docker/entrypoint.sh b/tastyigniter/docker/entrypoint.sh index a13e3a9..d2c0279 100644 --- a/tastyigniter/docker/entrypoint.sh +++ b/tastyigniter/docker/entrypoint.sh @@ -40,6 +40,36 @@ else echo "TastyIgniter already installed" fi +# Check for TastyIgniter's .nginx.conf file and copy it if needed +if [ -f /var/www/html/.nginx.conf ]; then + echo "TastyIgniter .nginx.conf found" +else + echo "TastyIgniter .nginx.conf not found, creating a default one" + cat > /var/www/html/.nginx.conf <