diff --git a/.docker/app/Dockerfile b/.docker/app/Dockerfile index c76ee6c..aabbb6c 100644 --- a/.docker/app/Dockerfile +++ b/.docker/app/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.1-fpm-alpine +FROM php:8.2-fpm-alpine ARG SERVER_ENVIRONMENT diff --git a/.docker/nginx/app/app.conf b/.docker/nginx/app/app.conf index a258689..52a2b86 100644 --- a/.docker/nginx/app/app.conf +++ b/.docker/nginx/app/app.conf @@ -23,7 +23,7 @@ server { location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass laradok_app:9000; + fastcgi_pass app:9000; fastcgi_index index.php; # For comfortable debugging fastcgi_read_timeout 1000; diff --git a/.docker/worker/Dockerfile b/.docker/worker/Dockerfile index 84cad9b..41e9253 100644 --- a/.docker/worker/Dockerfile +++ b/.docker/worker/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.1-cli-alpine +FROM php:8.2.1-cli-alpine # Add Repositories RUN rm -f /etc/apk/repositories &&\ diff --git a/docker-compose.yml.example b/docker-compose.yml.example index 6fbb14b..73caf08 100644 --- a/docker-compose.yml.example +++ b/docker-compose.yml.example @@ -1,30 +1,30 @@ version: '3' services: #Nginx Service - laradok_nginx: + nginx: image: nginx:latest - container_name: laradok_nginx + container_name: nginx tty: true ports: - - 8081:80 + - "8081:80" volumes: - ./.docker/nginx/nginx.conf:/etc/nginx/nginx.conf - ./.docker/nginx/app/app.conf:/etc/nginx/conf.d/default.conf depends_on: - - laradok_app + - app links: - - laradok_app + - app environment: - X_SERVER_TYPE=nginx networks: - laradok-network #PHP Service - laradok_app: + app: build: context: . dockerfile: ./.docker/app/Dockerfile - container_name: laradok_app + container_name: app volumes: - ./app:/var/www/app restart: always @@ -34,11 +34,11 @@ services: - laradok-network #Worker Service - laradok_worker: + worker: build: context: . dockerfile: ./.docker/worker/Dockerfile - container_name: laradok_worker + container_name: worker volumes: - ./app:/var/www/app - ./storage/logs/worker:/var/log @@ -50,9 +50,9 @@ services: - laradok-network #MySQL Service - laradok_db: + db: image: mysql:latest - container_name: laradok_db + container_name: db restart: always environment: MYSQL_DATABASE: ${DB_NAME} @@ -65,19 +65,19 @@ services: - laradok-network #mailhog service for testing emails - laradok_mailhog: + mailhog: image: mailhog/mailhog - container_name: laradok_mailhog + container_name: mailhog logging: driver: 'none' # disable saving logs ports: - - 1025:1025 # smtp server - - 8025:8025 # web ui + - "1025:1025" # smtp server + - "8025:8025" # web ui networks: - laradok-network #REDIS - laradok_redis: + redis: image: redis:latest container_name: redis ports: diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index 40bfb43..faa1138 --- a/install.sh +++ b/install.sh @@ -37,9 +37,9 @@ sudo chmod -R 777 app/bootstrap/cache #laravel dependencies echo "Installing laravel dependencies" -docker-compose exec laradok_worker composer install --prefer-source +docker-compose exec worker composer install --prefer-source echo "Generating laravel key" -docker-compose exec laradok_app php artisan key:generate +docker-compose exec app php artisan key:generate #up containers echo "Re-start containers"