build: Docker Files for Production

main
Flycro 2024-03-20 20:56:09 +01:00
parent 8c595aa3c6
commit 5a546f8ef2
5 changed files with 64 additions and 2 deletions

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM dunglas/frankenphp
RUN install-php-extensions pcntl
#ENV SERVER_NAME=bookstack.octolabs.net
ENV SERVER_NAME=:80
COPY . /app
ENTRYPOINT ["php", "artisan", "octane:frankenphp"]

View File

@ -0,0 +1,40 @@
services:
php:
image: dunglas/frankenphp
restart: unless-stopped
build:
dockerfile: Dockerfile
ports:
- "13379:8000"
networks:
- laravel
volumes:
- caddy_data:/data
- caddy_config:/config
redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- 'redis:/data'
networks:
- laravel
healthcheck:
test:
- CMD
- redis-cli
- ping
retries: 3
timeout: 5s
networks:
laravel:
driver: bridge
# Volumes needed for Caddy certificates and configuration
volumes:
caddy_data:
driver: local
caddy_config:
driver: local
redis:
driver: local

11
ecosystem.config.cjs Normal file
View File

@ -0,0 +1,11 @@
module.exports = {
apps: [
{
name: 'BookStack',
port: '3377',
exec_mode: 'cluster',
instances: 'max',
script: './.output/server/index.mjs'
}
]
}

View File

@ -11,7 +11,7 @@ export default defineNuxtConfig({
app: {
head: {
title: 'Laravel/Nuxt Boilerplate',
title: 'BookStack',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },

View File

@ -1,5 +1,5 @@
<template>
<div>
<span class="text-primary">Chapter</span> Stack
<span class="text-primary">Book</span> Stack
</div>
</template>