commit 5a2a716828c1077119aa5fe9eb53106cd5135b03 Author: kolaente Date: Sun Apr 14 18:20:05 2024 +0200 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..04e766f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +env.secrets diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8732251 --- /dev/null +++ b/docker-compose.yml @@ -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 + diff --git a/env.prod b/env.prod new file mode 100644 index 0000000..96ac292 --- /dev/null +++ b/env.prod @@ -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}" + diff --git a/env.secrets.example b/env.secrets.example new file mode 100644 index 0000000..8f89c30 --- /dev/null +++ b/env.secrets.example @@ -0,0 +1,3 @@ +GROQ_API_KEY= +ANTHROPIC_API_KEY= +