mirror of
https://github.com/notf0und/SGS
synced 2026-07-17 18:21:06 +00:00
Fix initial setup
This commit is contained in:
parent
eb4f5fd561
commit
a75f504dd5
+16
-5
@@ -12,11 +12,22 @@ COPY ./www .
|
|||||||
# Remove vendor and node_modules if they exist (to ensure clean install)
|
# Remove vendor and node_modules if they exist (to ensure clean install)
|
||||||
RUN rm -rf vendor node_modules
|
RUN rm -rf vendor node_modules
|
||||||
|
|
||||||
# Install composer dependencies during build
|
# Install composer dependencies
|
||||||
RUN composer install --no-interaction --optimize-autoloader --no-dev
|
RUN composer install --no-interaction --optimize-autoloader
|
||||||
|
|
||||||
# Install npm dependencies and build during build
|
# Copy .env.example to .env
|
||||||
|
RUN cp .env.example .env
|
||||||
|
|
||||||
|
# Generate application key
|
||||||
|
RUN php artisan key:generate
|
||||||
|
|
||||||
|
# Install npm dependencies and build
|
||||||
RUN npm install && npm run build
|
RUN npm install && npm run build
|
||||||
|
|
||||||
# Create storage link during build
|
# Create storage link
|
||||||
RUN php artisan storage:link
|
RUN php artisan storage:link
|
||||||
|
|
||||||
|
# Fix permissions for Laravel storage and bootstrap/cache
|
||||||
|
# Use numeric IDs (1000:1000 from PUID/PGID in docker-compose)
|
||||||
|
RUN chown -R 1000:1000 /app/www && \
|
||||||
|
chmod -R 775 /app/www/storage /app/www/bootstrap/cache
|
||||||
@@ -8,7 +8,6 @@ services:
|
|||||||
- PGID=1000
|
- PGID=1000
|
||||||
- TZ=Etc/UTC
|
- TZ=Etc/UTC
|
||||||
volumes:
|
volumes:
|
||||||
- ./www:/app/www
|
|
||||||
- ./games:/app/www/storage/app/public/games
|
- ./games:/app/www/storage/app/public/games
|
||||||
ports:
|
ports:
|
||||||
- 8030:80
|
- 8030:80
|
||||||
|
|||||||
Reference in New Issue
Block a user