Skip to content

Commit

Permalink
Merge pull request #13 from uasoft-indonesia/task/sail-badaso
Browse files Browse the repository at this point in the history
Task docker badaso sail
  • Loading branch information
rizkiheryandi authored Mar 11, 2022
2 parents 6d819c2 + 2b2d17e commit 6f31a75
Show file tree
Hide file tree
Showing 104 changed files with 214 additions and 392 deletions.
21 changes: 12 additions & 9 deletions .env.example.docker
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
APP_NAME=Badaso
APP_ENV=local
APP_KEY=
APP_KEY=base64:YGxVtWjdwOyIVxkoGRbpYw9Akxvyg2T7ZsOGn7X6cAU=
APP_DEBUG=true
APP_URL=http://localhost
APP_URL=http://localhost:8000

LOG_CHANNEL=daily
LOG_LEVEL=debug
Expand All @@ -11,8 +11,8 @@ DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=badaso
DB_USERNAME=sail
DB_PASSWORD=password
DB_USERNAME=home
DB_PASSWORD=secret

BROADCAST_DRIVER=log
CACHE_DRIVER=file
Expand All @@ -23,7 +23,7 @@ SESSION_LIFETIME=120

MEMCACHED_HOST=memcached

REDIS_HOST=redis
REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379

Expand Down Expand Up @@ -54,9 +54,6 @@ MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
SCOUT_DRIVER=meilisearch
MEILISEARCH_HOST=http://meilisearch:7700

WWWGROUP=1000
WWWUSER=1000

JWT_SECRET=

BADASO_AUTH_TOKEN_LIFETIME=
Expand Down Expand Up @@ -102,4 +99,10 @@ MIX_API_DOCUMENTATION_ROUTE=api-docs

BADASO_TABLE_PREFIX=badaso_

OCTANE_SERVER=roadrunner
OCTANE_SERVER=swoole

WWWGROUP=1000
WWWUSER=1000

WORKSPACE_PUID=1000
WORKSPACE_PGID=1000
79 changes: 0 additions & 79 deletions Dockerfile

This file was deleted.

Empty file modified bootstrap/app.php
100644 → 100755
Empty file.
Empty file modified bootstrap/cache/.gitignore
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.40",
"laravel/octane": "^1.2",
"laravel/tinker": "^2.5"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion config/badaso-watch-tables.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

return [
// table names for generating CRUD_DATA seeders.

];
3 changes: 2 additions & 1 deletion config/octane.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Laravel\Octane\Listeners\EnsureUploadedFilesAreValid;
use Laravel\Octane\Listeners\EnsureUploadedFilesCanBeMoved;
use Laravel\Octane\Listeners\FlushTemporaryContainerInstances;
use Laravel\Octane\Listeners\FlushUploadedFiles;
use Laravel\Octane\Listeners\ReportException;
use Laravel\Octane\Listeners\StopWorkerIfNecessary;
use Laravel\Octane\Octane;
Expand Down Expand Up @@ -78,7 +79,7 @@
],

RequestTerminated::class => [
//
// FlushUploadedFiles::class,
],

TaskReceived::class => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ class BadasoDeploymentOrchestratorSeeder extends Seeder
*/
public function run()
{

}
}
2 changes: 2 additions & 0 deletions database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Database\Seeders;

use Database\Seeders\Badaso\BadasoSeeder;
use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
Expand All @@ -14,5 +15,6 @@ class DatabaseSeeder extends Seeder
public function run()
{
// \App\Models\User::factory(10)->create();
$this->call(BadasoSeeder::class);
}
}
64 changes: 0 additions & 64 deletions docker-compose.dev.yml

This file was deleted.

44 changes: 0 additions & 44 deletions docker-compose.prod.yml

This file was deleted.

94 changes: 94 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# For more information: https://laravel.com/docs/sail
version: "3"
services:
badaso:
build:
context: ./docker/8.1
dockerfile: Dockerfile
args:
WWWGROUP: "${WWWGROUP-1000}"
image: badaso
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "${APP_PORT:-8000}:8000"
environment:
WWWUSER: "${WWWUSER-1000}"
LARAVEL_SAIL: 1
XDEBUG_MODE: "${SAIL_XDEBUG_MODE:-off}"
XDEBUG_CONFIG: "${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}"
volumes:
- ".:/var/www/html"
networks:
- sail
depends_on:
- mysql
- redis
# - meilisearch
# - selenium
mysql:
image: "mysql/mysql-server:8.0"
ports:
- "${FORWARD_DB_PORT:-3300}:3306"
environment:
MYSQL_ROOT_PASSWORD: "${DB_PASSWORD}"
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: "${DB_DATABASE}"
MYSQL_USER: "${DB_USERNAME}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
MYSQL_ALLOW_EMPTY_PASSWORD: 1
volumes:
- "sail-mysql:/var/lib/mysql"
networks:
- sail
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"]
retries: 3
timeout: 5s
redis:
image: "redis:alpine"
ports:
- "${FORWARD_REDIS_PORT:-6379}:6379"
volumes:
- "sail-redis:/data"
networks:
- sail
healthcheck:
test: ["CMD", "redis-cli", "ping"]
retries: 3
timeout: 5s
# meilisearch:
# image: 'getmeili/meilisearch:latest'
# ports:
# - '${FORWARD_MEILISEARCH_PORT:-7700}:7700'
# volumes:
# - 'sail-meilisearch:/data.ms'
# networks:
# - sail
# healthcheck:
# test: ["CMD", "wget", "--no-verbose", "--spider", "http://localhost:7700/health"]
# retries: 3
# timeout: 5s
# mailhog:
# image: 'mailhog/mailhog:latest'
# ports:
# - '${FORWARD_MAILHOG_PORT:-1025}:1025'
# - '${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025'
# networks:
# - sail
# # selenium:
# image: 'selenium/standalone-chrome'
# volumes:
# - '/dev/shm:/dev/shm'
# networks:
# - sail
networks:
sail:
driver: bridge
volumes:
sail-mysql:
driver: local
sail-redis:
driver: local
sail-meilisearch:
driver: local
Loading

0 comments on commit 6f31a75

Please sign in to comment.