Compare commits
5
Commits
main
..
a2ed9a9838
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2ed9a9838 | ||
|
|
937004a48c | ||
|
|
bd6e311a73 | ||
|
|
a628dc1424 | ||
|
|
7fa56f7584 |
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!Dockerfile
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
APP_NAME=Pollux
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_URL=http://localhost:8000
|
||||||
|
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=db
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=pollux
|
||||||
|
DB_USERNAME=pollux
|
||||||
|
DB_PASSWORD=secret
|
||||||
|
|
||||||
|
BROADCAST_DRIVER=log
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
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=
|
||||||
|
PUSHER_APP_CLUSTER=mt1
|
||||||
|
|
||||||
|
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||||
|
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
FROM composer:2.8 AS composer
|
||||||
|
|
||||||
|
FROM php:7.4-cli
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends libonig-dev libzip-dev \
|
||||||
|
&& docker-php-ext-install -j"$(nproc)" mbstring pdo_mysql zip \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
|
WORKDIR /var/www
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
name: pollux
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
build: .
|
||||||
|
working_dir: /var/www
|
||||||
|
user: "${UID:-1000}:${GID:-1000}"
|
||||||
|
environment:
|
||||||
|
HOME: /tmp
|
||||||
|
COMPOSER_HOME: /tmp/composer
|
||||||
|
APP_URL: http://localhost:8000
|
||||||
|
DB_CONNECTION: mysql
|
||||||
|
DB_HOST: db
|
||||||
|
DB_PORT: "3306"
|
||||||
|
DB_DATABASE: pollux
|
||||||
|
DB_USERNAME: pollux
|
||||||
|
DB_PASSWORD: secret
|
||||||
|
volumes:
|
||||||
|
- .:/var/www
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
command: php artisan serve --host=0.0.0.0 --port=8000
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: mysql:5.7
|
||||||
|
environment:
|
||||||
|
MYSQL_DATABASE: pollux
|
||||||
|
MYSQL_USER: pollux
|
||||||
|
MYSQL_PASSWORD: secret
|
||||||
|
MYSQL_ROOT_PASSWORD: root
|
||||||
|
volumes:
|
||||||
|
- mysql-data:/var/lib/mysql
|
||||||
|
ports:
|
||||||
|
- "3307:3306"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -uroot -proot --silent"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 20
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mysql-data:
|
||||||
@@ -25,8 +25,9 @@ class CreateBookingsTable extends Migration
|
|||||||
// The name of the person or company which the booking belongs to
|
// The name of the person or company which the booking belongs to
|
||||||
$table->string('person_or_company');
|
$table->string('person_or_company');
|
||||||
|
|
||||||
// An additional note to the booking
|
// An additional note to the booking. The real dataset contains
|
||||||
$table->string('note')->nullable();
|
// notes longer than the 191-character default string length.
|
||||||
|
$table->text('note')->nullable();
|
||||||
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
|
class DevUserSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a local development login.
|
||||||
|
*
|
||||||
|
* Email: dev@pollux.local
|
||||||
|
* Password: password
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
App\User::updateOrCreate(
|
||||||
|
['email' => 'dev@pollux.local'],
|
||||||
|
[
|
||||||
|
'name' => 'Dev User',
|
||||||
|
'password' => bcrypt('password'),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
[tools]
|
||||||
|
# Old Laravel Mix 2 / node-sass toolchain; use Node 10 for asset builds.
|
||||||
|
node = "10.24.1"
|
||||||
|
just = "1.59.0"
|
||||||
|
|
||||||
|
[env]
|
||||||
|
COMPOSE_PROJECT_NAME = "pollux"
|
||||||
@@ -16,6 +16,6 @@ class ExampleTest extends TestCase
|
|||||||
{
|
{
|
||||||
$response = $this->get('/');
|
$response = $this->get('/');
|
||||||
|
|
||||||
$response->assertStatus(200);
|
$response->assertRedirect('/bookings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user