This commit is contained in:
kolaente 2024-04-14 18:20:05 +02:00
commit 5a2a716828
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
4 changed files with 98 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
env.secrets

55
docker-compose.yml Normal file
View File

@ -0,0 +1,55 @@
version: '3'
x-web:
&web-default
restart: unless-stopped
image: kolaente.dev/prisma/swivel:latest
depends_on:
- db
env_file:
- env.prod
- env.secrets
volumes:
- ./storage:/var/www/storage
services:
web:
<< : *web-default
networks:
- default
- web
labels:
- "traefik.docker.network=web"
- "traefik.enable=true"
- "traefik.http.routers.swivel.rule=Host(`swivel.prisma.rocks`)"
- "traefik.http.routers.swivel.entrypoints=https"
- "traefik.http.routers.swivel.tls.certResolver=basic"
- "com.centurylinklabs.watchtower.enable=true"
# healthcheck:
# test: [ "CMD", "curl", "--fail", "http://localhost/health" ]
# retries: 3
# timeout: 5s
queue:
<< : *web-default
command: php artisan queue:work
db:
image: mariadb:10
restart: unless-stopped
volumes:
- ./db:/var/lib/mysql
environment:
- MYSQL_DATABASE=swivel
- MYSQL_USER=swivel
- MYSQL_PASSWORD=Leil8aep
- MYSQL_ROOT_PASSWORD=uoWute9Y
redis:
restart: unless-stopped
image: redis
networks:
web:
external: true

39
env.prod Normal file
View File

@ -0,0 +1,39 @@
APP_NAME=Swivel
APP_ENV=local
APP_KEY=base64:wLrrzHupbGFm/Q+mR6uu0WSdGyOsVbyp7baL95yrCaE=
APP_DEBUG=false
APP_TIMEZONE=UTC
APP_URL=https://swivel.prisma.rocks
APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database
LOG_CHANNEL=stack
LOG_STACK=single
LOG_LEVEL=info
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=swivel
DB_USERNAME=swivel
DB_PASSWORD=Leil8aep
BROADCAST_CONNECTION=log
CACHE_STORE=redis
FILESYSTEM_DISK=local
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
SESSION_LIFETIME=120
REDIS_HOST=redis
MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"

3
env.secrets.example Normal file
View File

@ -0,0 +1,3 @@
GROQ_API_KEY=
ANTHROPIC_API_KEY=