mirror of
https://github.com/Kovah/LinkAce.git
synced 2025-04-22 07:52:43 +02:00
Adjust release setup with Caddy, fix database config in setup
This commit is contained in:
parent
3140895651
commit
1d4cc15b9b
@ -7,13 +7,13 @@ APP_KEY=someRandomStringWith32Characters
|
||||
## Configuration of the database connection
|
||||
## Attention: Those settings are configured during the web setup, please do not modify them now.
|
||||
# Set the database driver (mysql, pgsql, sqlsrv, sqlite)
|
||||
DB_CONNECTION=mysql
|
||||
DB_CONNECTION=sqlite
|
||||
# Set the database name (MySQL, Postgres,...) or path (SQLite) here
|
||||
DB_DATABASE=/app/database/database.sqlite
|
||||
# Set the host of your database here
|
||||
DB_HOST=127.0.0.1
|
||||
# Set the port of your database here
|
||||
DB_PORT=3306
|
||||
# Set the database name here
|
||||
DB_DATABASE=linkace
|
||||
# Set both username and password of the user accessing the database
|
||||
DB_USERNAME=linkace
|
||||
# Wrap your password into quotes (") if it contains special characters
|
||||
|
@ -13,9 +13,9 @@ services:
|
||||
volumes:
|
||||
- ./.env:/app/.env
|
||||
- ./backups:/app/storage/app/backups
|
||||
# Remove the hash of the following line if you want to use HTTPS for this container
|
||||
#- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
#- ./caddy-data:/data/caddy
|
||||
# Remove the hash of the following lines if you want to use HTTPS for this container
|
||||
#- ./caddy-data:/home/www-data/.local/share/caddy
|
||||
#- ./ssl.Caddyfile:/etc/caddy/Caddyfile
|
||||
|
||||
# --- Database
|
||||
db:
|
||||
|
@ -20,7 +20,7 @@ COPY ./routes /app/routes
|
||||
COPY ./tests /app/tests
|
||||
|
||||
COPY ["./artisan", "./composer.json", "./composer.lock", "/app/"]
|
||||
COPY ./.env.example /app/.env
|
||||
#COPY ./.env.example /app/.env
|
||||
|
||||
# Install dependencies using Composer
|
||||
RUN composer install -n --prefer-dist --no-dev
|
||||
@ -65,7 +65,6 @@ COPY --chown=www-data:www-data ./routes /app/routes
|
||||
COPY --chown=www-data:www-data ./storage /app/storage
|
||||
|
||||
COPY --chown=www-data:www-data ["./artisan", "./composer.json", "./composer.lock", "./README.md", "./LICENSE.md", "./package.json", "/app/"]
|
||||
COPY --chown=www-data:www-data ./.env.example /app/.env
|
||||
|
||||
# Copy files from the composer build
|
||||
COPY --from=builder --chown=www-data:www-data /app/vendor /app/vendor
|
||||
@ -85,6 +84,8 @@ RUN touch ./database/database.sqlite \
|
||||
&& chmod +w ./database/database.sqlite \
|
||||
&& chmod +r ./database
|
||||
|
||||
COPY --chown=www-data:www-data ./.env.example /app/.env
|
||||
|
||||
# Configure Supervisor for PHP + Caddy
|
||||
ENV PORT=80
|
||||
ENV CADDY_PHP_HOST=localhost
|
||||
|
12
resources/docker/ssl.Caddyfile
Normal file
12
resources/docker/ssl.Caddyfile
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
servers {
|
||||
trusted_proxies static private_ranges
|
||||
}
|
||||
}
|
||||
|
||||
{$LINKACE_DOMAIN} {
|
||||
root * /app/public
|
||||
encode zstd gzip
|
||||
php_fastcgi {$CADDY_PHP_HOST:php}:9000
|
||||
file_server
|
||||
}
|
@ -4,14 +4,16 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/svg+xml" href="{{ asset('favicon.svg') }}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ asset('favicon-32x32.png') }}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('favicon-16x16.png') }}">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="{{ asset('apple-touch-icon.png') }}">
|
||||
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>@isset($pageTitle){{$pageTitle}} - @endisset{{ config('app.name', 'LinkAce') }}</title>
|
||||
|
||||
<link href="{{ mix('assets/dist/css/app.css') }}" rel="stylesheet">
|
||||
|
||||
@include('layouts.partials.favicon')
|
||||
</head>
|
||||
<body class="setup">
|
||||
<div id="app">
|
||||
|
@ -24,9 +24,18 @@
|
||||
</label>
|
||||
<select name="connection" id="connection"
|
||||
class="form-select{{ $errors->has('connection') ? ' is-invalid' : '' }}">
|
||||
<option value="mysql" @selected(old('connection') === 'mysql')>MySQL / MariaDB</option>
|
||||
<option value="sqlite" @selected(old('connection') === 'sqlite')>SQLite</option>
|
||||
<option value="pgsql" @selected(old('connection') === 'pgsql')>PostgreSQL</option>
|
||||
<option
|
||||
value="sqlite" @selected(old('connection', config('database.default')) === 'sqlite')>
|
||||
SQLite
|
||||
</option>
|
||||
<option
|
||||
value="mysql" @selected(old('connection', config('database.default')) === 'mysql')>
|
||||
MySQL / MariaDB
|
||||
</option>
|
||||
<option
|
||||
value="pgsql" @selected(old('connection', config('database.default')) === 'pgsql')>
|
||||
PostgreSQL
|
||||
</option>
|
||||
</select>
|
||||
@if ($errors->has('connection'))
|
||||
<p class="invalid-feedback" role="alert">
|
||||
@ -41,7 +50,8 @@
|
||||
</label>
|
||||
<input type="text" name="db_path" id="db_path" required
|
||||
class="form-control{{ $errors->has('db_path') ? ' is-invalid' : '' }}"
|
||||
placeholder="localhost" value="{{ old('db_path') ?: database_path('database.sqlite') }}">
|
||||
placeholder="localhost"
|
||||
value="{{ old('db_path') ?: database_path('database.sqlite') }}">
|
||||
@if ($errors->has('db_path'))
|
||||
<p class="invalid-feedback" role="alert">
|
||||
{{ $errors->first('db_path') }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user