Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Dec 5, 2023
1 parent 3a987c8 commit 41280aa
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 78 deletions.
5 changes: 0 additions & 5 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,3 @@ APP_KEY=

DB_PASSWORD=
REDIS_PASSWORD=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
VITE_PUSHER_APP_KEY=$PUSHER_APP_KEY
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
App\Providers\AppServiceProvider::class,
App\Providers\FortifyServiceProvider::class,
App\Providers\AuthServiceProvider::class,
App\Providers\BroadcastServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\HorizonServiceProvider::class,
App\Providers\RouteServiceProvider::class,
Expand Down
2 changes: 1 addition & 1 deletion config/broadcasting.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
|
*/

'default' => env('BROADCAST_DRIVER', 'pusher'),
'default' => env('BROADCAST_DRIVER', 'null'),

/*
|--------------------------------------------------------------------------
Expand Down
32 changes: 16 additions & 16 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ services:
SSL_MODE: "off"
AUTORUN_LARAVEL_STORAGE_LINK: "false"
AUTORUN_LARAVEL_MIGRATION: "false"
PUSHER_HOST: "coolify-soketi"
PUSHER_APP_ID: "${PUSHER_APP_ID:-coolify}"
PUSHER_APP_KEY: "${PUSHER_APP_KEY:-coolify}"
PUSHER_APP_SECRET: "${PUSHER_APP_SECRET:-coolify}"
# PUSHER_HOST: "coolify-soketi"
# PUSHER_APP_ID: "${PUSHER_APP_ID:-coolify}"
# PUSHER_APP_KEY: "${PUSHER_APP_KEY:-coolify}"
# PUSHER_APP_SECRET: "${PUSHER_APP_SECRET:-coolify}"
volumes:
- .:/var/www/html/:cached
postgres:
Expand All @@ -48,21 +48,21 @@ services:
volumes:
- /data/coolify/_volumes/redis/:/data
# - coolify-redis-data-dev:/data
soketi:
env_file:
- .env
ports:
- "${FORWARD_SOKETI_PORT:-6001}:6001"
environment:
SOKETI_DEBUG: "false"
SOKETI_DEFAULT_APP_ID: "${PUSHER_APP_ID:-coolify}"
SOKETI_DEFAULT_APP_KEY: "${PUSHER_APP_KEY:-coolify}"
SOKETI_DEFAULT_APP_SECRET: "${PUSHER_APP_SECRET:-coolify}"
# soketi:
# env_file:
# - .env
# ports:
# - "${FORWARD_SOKETI_PORT:-6001}:6001"
# environment:
# SOKETI_DEBUG: "false"
# SOKETI_DEFAULT_APP_ID: "${PUSHER_APP_ID:-coolify}"
# SOKETI_DEFAULT_APP_KEY: "${PUSHER_APP_KEY:-coolify}"
# SOKETI_DEFAULT_APP_SECRET: "${PUSHER_APP_SECRET:-coolify}"
vite:
image: node:20
working_dir: /var/www/html
environment:
VITE_PUSHER_APP_KEY: "${PUSHER_APP_KEY:-coolify}"
# environment:
# VITE_PUSHER_APP_KEY: "${PUSHER_APP_KEY:-coolify}"
ports:
- "${VITE_PORT:-5173}:${VITE_PORT:-5173}"
volumes:
Expand Down
19 changes: 9 additions & 10 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ services:
- PHP_PM_START_SERVERS=1
- PHP_PM_MIN_SPARE_SERVERS=1
- PHP_PM_MAX_SPARE_SERVERS=10
- VITE_PUSHER_APP_KEY
- PUSHER_APP_ID
- PUSHER_APP_KEY
- PUSHER_APP_SECRET
# - PUSHER_APP_ID
# - PUSHER_APP_KEY
# - PUSHER_APP_SECRET
- SELF_HOSTED
- WAITLIST
- SUBSCRIPTION_PROVIDER
Expand Down Expand Up @@ -115,12 +114,12 @@ services:
interval: 2s
retries: 5
timeout: 2s
soketi:
environment:
SOKETI_DEBUG: "${SOKETI_DEBUG:-false}"
SOKETI_DEFAULT_APP_ID: "${PUSHER_APP_ID}"
SOKETI_DEFAULT_APP_KEY: "${PUSHER_APP_KEY}"
SOKETI_DEFAULT_APP_SECRET: "${PUSHER_APP_SECRET}"
# soketi:
# environment:
# SOKETI_DEBUG: "${SOKETI_DEBUG:-false}"
# SOKETI_DEFAULT_APP_ID: "${PUSHER_APP_ID}"
# SOKETI_DEFAULT_APP_KEY: "${PUSHER_APP_KEY}"
# SOKETI_DEFAULT_APP_SECRET: "${PUSHER_APP_SECRET}"
volumes:
coolify-db:
name: coolify-db
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ services:
restart: always
networks:
- coolify
soketi:
image: 'quay.io/soketi/soketi:latest-16-alpine'
container_name: coolify-soketi
restart: always
networks:
- coolify
# soketi:
# image: 'quay.io/soketi/soketi:latest-16-alpine'
# container_name: coolify-soketi
# restart: always
# networks:
# - coolify
networks:
coolify:
name: coolify
Expand Down
100 changes: 100 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@tailwindcss/typography": "0.5.10",
"alpinejs": "3.13.2",
"daisyui": "4.3.1",
"ioredis": "^5.3.2",
"tailwindcss-scrollbar": "0.1.0"
}
}
34 changes: 17 additions & 17 deletions resources/js/app.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import Alpine from "alpinejs";
import Echo from 'laravel-echo';
import Pusher from 'pusher-js';
// import Echo from 'laravel-echo';
// import Pusher from 'pusher-js';
import { createApp } from "vue";
import MagicBar from "./components/MagicBar.vue";
import Toaster from "../../vendor/masmerise/livewire-toaster/resources/js";

window.Pusher = Pusher;

window.Echo = new Echo({
broadcaster: 'pusher',
cluster: import.meta.env.VITE_PUSHER_HOST || window.location.hostname,
key: import.meta.env.VITE_PUSHER_APP_KEY,
wsHost: import.meta.env.VITE_PUSHER_HOST || window.location.hostname,
wsPort: import.meta.env.VITE_PUSHER_PORT || 6001,
wssPort: import.meta.env.VITE_PUSHER_PORT || 6001,
forceTLS: false,
encrypted: true,
disableStats: false,
enableLogging: true,
enabledTransports: ['ws', 'wss'],
});
// window.Pusher = Pusher;

// window.Echo = new Echo({
// broadcaster: 'pusher',
// cluster: window.location.hostname,
// key: 'coolify',
// wsHost: window.location.hostname,
// wsPort: 6001,
// wssPort: 6001,
// forceTLS: false,
// encrypted: true,
// disableStats: false,
// enableLogging: true,
// enabledTransports: ['ws', 'wss'],
// });

Alpine.plugin(Toaster);

Expand Down
6 changes: 3 additions & 3 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ if [ ! -f /data/coolify/source/.env ]; then
sed -i "s|APP_KEY=.*|APP_KEY=base64:$(openssl rand -base64 32)|g" /data/coolify/source/.env
sed -i "s|DB_PASSWORD=.*|DB_PASSWORD=$(openssl rand -base64 32)|g" /data/coolify/source/.env
sed -i "s|REDIS_PASSWORD=.*|REDIS_PASSWORD=$(openssl rand -base64 32)|g" /data/coolify/source/.env
sed -i "s|PUSHER_APP_ID=.*|PUSHER_APP_ID=$(openssl rand -hex 32)|g" /data/coolify/source/.env
sed -i "s|PUSHER_APP_KEY=.*|PUSHER_APP_KEY=$(openssl rand -hex 32)|g" /data/coolify/source/.env
sed -i "s|PUSHER_APP_SECRET=.*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|g" /data/coolify/source/.env
# sed -i "s|PUSHER_APP_ID=.*|PUSHER_APP_ID=$(openssl rand -hex 32)|g" /data/coolify/source/.env
# sed -i "s|PUSHER_APP_KEY=.*|PUSHER_APP_KEY=$(openssl rand -hex 32)|g" /data/coolify/source/.env
# sed -i "s|PUSHER_APP_SECRET=.*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|g" /data/coolify/source/.env
fi

# Merge .env and .env.production. New values will be added to .env
Expand Down
Loading

0 comments on commit 41280aa

Please sign in to comment.