Skip to content

Commit

Permalink
Merge pull request #69 from lanedirt/68-bundle-jscss
Browse files Browse the repository at this point in the history
68 bundle jscss
  • Loading branch information
lanedirt authored Apr 15, 2024
2 parents 0e9d7ca + 1671bc2 commit 230d89b
Show file tree
Hide file tree
Showing 81 changed files with 166,257 additions and 11,303 deletions.
9 changes: 8 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
APP_NAME=Laravel
APP_NAME=OGameX
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

# Enable debugbar for local development
DEBUGBAR_ENABLED=false
# Absolute path to the current directory in Docker container
DEBUGBAR_REMOTE_SITES_PATH=/var/www
# Absolute path to the current directory
DEBUGBAR_LOCAL_SITES_PATH=/path/to/your/project

DB_CONNECTION=mysql
DB_HOST=ogame-db
DB_PORT=3306
Expand Down
41 changes: 41 additions & 0 deletions .env.example-prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
APP_NAME=OGameX
APP_ENV=production
APP_KEY=
APP_DEBUG=false
APP_LOG_LEVEL=error
APP_URL=http://localhost

# Enable debugbar for local development
DEBUGBAR_ENABLED=false
# Absolute path to the current directory in Docker container
DEBUGBAR_REMOTE_SITES_PATH=/var/www
# Absolute path to the current directory
DEBUGBAR_LOCAL_SITES_PATH=/path/to/your/project

DB_CONNECTION=mysql
DB_HOST=ogame-db
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=toor

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=database
SESSION_LIFETIME=720
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
4 changes: 2 additions & 2 deletions .github/workflows/run-docker-compose-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
- name: Set Permissions
run: docker compose exec -T ogame-app chmod -R 777 /var/www
- name: Copy .env
run: docker compose exec -T ogame-app cp .env.example .env
run: docker compose exec -T ogame-app cp .env.example-prod .env
- name: Run Laravel setup commands
run: |
docker compose exec -T ogame-app composer install --no-dev
docker compose exec -T ogame-app php artisan key:generate
- name: Run DB Migrations
run: docker compose exec -T ogame-app php artisan migrate
run: docker compose exec -T ogame-app php artisan migrate --force
- name: Run configuration cache commands
run: docker compose exec -T ogame-app php artisan cache:clear && docker compose exec -T ogame-app php artisan config:cache && docker compose exec -T ogame-app php artisan route:cache && docker compose exec -T ogame-app php artisan view:cache
4 changes: 2 additions & 2 deletions .github/workflows/run-tests-docker-compose-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
- name: Set Permissions
run: docker compose exec -T ogame-app chmod -R 777 /var/www
- name: Copy .env
run: docker compose exec -T ogame-app cp .env.example .env
run: docker compose exec -T ogame-app cp .env.example-prod .env
- name: Run Laravel setup commands
run: |
docker compose exec -T ogame-app composer install
docker compose exec -T ogame-app php artisan key:generate
- name: Run DB Migrations
run: docker compose exec -T ogame-app php artisan migrate
run: docker compose exec -T ogame-app php artisan migrate --force
- name: Run configuration cache commands
run: docker compose exec -T ogame-app php artisan cache:clear && docker compose exec -T ogame-app php artisan config:cache && docker compose exec -T ogame-app php artisan route:cache && docker compose exec -T ogame-app php artisan view:cache
- name: Run Tests
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,11 @@ After completing the setup, visit http://localhost to access OGameX. You first n
For production there is a separate docker-compose file that is used to run the application. This file is called `docker-compose.prod.yml`. This configuration contains
several performance optimizations and security settings that are not present in the development configuration.

***Caution:*** the production configuration is not yet fully optimized and should be used with caution. As an example, the database root user uses a default password which should be changed to something unique.
***Caution:*** the production configuration is not yet fully optimized and should be used with caution. As an example, the database root user uses a default password which should be changed to something unique.
You should review all settings before deploying this project to a publicly accessible server.

1. Clone the repository.
2. Copy `.env.example` to `.env`.
2. Copy `.env.example-prod` to `.env`.
3. Launch the project using Docker Compose:
```
$ docker compose -f docker-compose.prod.yml up -d --build --force-recreate
Expand Down
1 change: 1 addition & 0 deletions app/Services/PlanetListService.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public function load(int $id) : void
* Updates all planets in this planet list.
*
* @return void
* @throws Exception
*/
public function update(): void
{
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"laravel/ui": "^4.5"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.13",
"barryvdh/laravel-ide-helper": "^3.0",
"fakerphp/faker": "^1.23",
"larastan/larastan": "^2.0",
Expand Down
154 changes: 153 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 230d89b

Please sign in to comment.