mirror of
https://github.com/rybbit-io/rybbit.git
synced 2025-05-10 20:05:38 +02:00
New env (#122)
* Allow setting all variables in .env file * Fix postgres version * pin versions * bump --------- Co-authored-by: pe1uca <edga.alva@gmail.com>
This commit is contained in:
parent
ff4f2e1246
commit
93a6639d2e
5 changed files with 36 additions and 24 deletions
12
.env.example
Normal file
12
.env.example
Normal file
|
@ -0,0 +1,12 @@
|
|||
DOMAIN_NAME=demo.rybbit.io
|
||||
BASE_URL="https://${DOMAIN_NAME}"
|
||||
BETTER_AUTH_SECRET=insecure-secret
|
||||
DISABLE_SIGNUP=false
|
||||
|
||||
CLICKHOUSE_DB=analytics
|
||||
CLICKHOUSE_USER=default
|
||||
CLICKHOUSE_PASSWORD=frog
|
||||
|
||||
POSTGRES_DB=analytics
|
||||
POSTGRES_USER=frog
|
||||
POSTGRES_PASSWORD=frog
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
caddy:
|
||||
image: caddy:latest
|
||||
image: caddy:2.10.0
|
||||
container_name: caddy
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
|
@ -21,7 +21,7 @@ services:
|
|||
|
||||
clickhouse:
|
||||
container_name: clickhouse
|
||||
image: clickhouse/clickhouse-server:latest
|
||||
image: clickhouse/clickhouse-server:25.4.2
|
||||
ports:
|
||||
- "8123:8123"
|
||||
- "9000:9000"
|
||||
|
@ -41,7 +41,7 @@ services:
|
|||
restart: unless-stopped
|
||||
|
||||
postgres:
|
||||
image: postgres:latest
|
||||
image: postgres:17.4
|
||||
container_name: postgres
|
||||
environment:
|
||||
POSTGRES_USER: frog
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
caddy:
|
||||
image: caddy:latest
|
||||
image: caddy:2.10.0
|
||||
container_name: caddy
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
|
@ -21,7 +21,7 @@ services:
|
|||
|
||||
clickhouse:
|
||||
container_name: clickhouse
|
||||
image: clickhouse/clickhouse-server:latest
|
||||
image: clickhouse/clickhouse-server:25.4.2
|
||||
ports:
|
||||
- "8123:8123"
|
||||
- "9000:9000"
|
||||
|
@ -41,7 +41,7 @@ services:
|
|||
restart: unless-stopped
|
||||
|
||||
postgres:
|
||||
image: postgres:latest
|
||||
image: postgres:17.4
|
||||
container_name: postgres
|
||||
environment:
|
||||
POSTGRES_USER: frog
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
caddy:
|
||||
image: caddy:latest
|
||||
image: caddy:2.10.0
|
||||
container_name: caddy
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
|
@ -21,7 +21,7 @@ services:
|
|||
|
||||
clickhouse:
|
||||
container_name: clickhouse
|
||||
image: clickhouse/clickhouse-server:latest
|
||||
image: clickhouse/clickhouse-server:25.4.2
|
||||
ports:
|
||||
- "8123:8123"
|
||||
- "9000:9000"
|
||||
|
@ -29,9 +29,9 @@ services:
|
|||
- clickhouse-data:/var/lib/clickhouse
|
||||
- ./clickhouse_config:/etc/clickhouse-server/config.d
|
||||
environment:
|
||||
- CLICKHOUSE_DB=analytics
|
||||
- CLICKHOUSE_USER=default
|
||||
- CLICKHOUSE_PASSWORD=frog
|
||||
- CLICKHOUSE_DB=${CLICKHOUSE_DB:-analytics}
|
||||
- CLICKHOUSE_USER=${CLICKHOUSE_USER:-default}
|
||||
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-frog}
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8123/ping"]
|
||||
interval: 3s
|
||||
|
@ -41,12 +41,12 @@ services:
|
|||
restart: unless-stopped
|
||||
|
||||
postgres:
|
||||
image: postgres:latest
|
||||
image: postgres:17.4
|
||||
container_name: postgres
|
||||
environment:
|
||||
POSTGRES_USER: frog
|
||||
POSTGRES_PASSWORD: frog
|
||||
POSTGRES_DB: analytics
|
||||
- POSTGRES_USER=${POSTGRES_USER:-frog}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-frog}
|
||||
- POSTGRES_DB=${POSTGRES_DB:-analytics}
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
restart: unless-stopped
|
||||
|
@ -59,13 +59,13 @@ services:
|
|||
environment:
|
||||
- NODE_ENV=production
|
||||
- CLICKHOUSE_HOST=http://clickhouse:8123
|
||||
- CLICKHOUSE_DB=analytics
|
||||
- CLICKHOUSE_PASSWORD=frog
|
||||
- CLICKHOUSE_DB=${CLICKHOUSE_DB:-analytics}
|
||||
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-frog}
|
||||
- POSTGRES_HOST=postgres
|
||||
- POSTGRES_PORT=5432
|
||||
- POSTGRES_DB=analytics
|
||||
- POSTGRES_USER=frog
|
||||
- POSTGRES_PASSWORD=frog
|
||||
- POSTGRES_DB=${POSTGRES_DB:-analytics}
|
||||
- POSTGRES_USER=${POSTGRES_USER:-frog}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-frog}
|
||||
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
|
||||
- BASE_URL=${BASE_URL}
|
||||
- DISABLE_SIGNUP=${DISABLE_SIGNUP}
|
||||
|
|
|
@ -9,10 +9,10 @@ export default defineConfig({
|
|||
dialect: "postgresql",
|
||||
dbCredentials: {
|
||||
host: process.env.POSTGRES_HOST || "postgres",
|
||||
port: 5432,
|
||||
database: "analytics",
|
||||
user: "frog",
|
||||
password: "frog",
|
||||
port: process.env.POSTGRES_PORT || 5432,
|
||||
database: process.env.POSTGRES_DB || "analytics",
|
||||
user: process.env.POSTGRES_USER || "frog",
|
||||
password: process.env.POSTGRES_PASSWORD || "frog",
|
||||
ssl: false,
|
||||
},
|
||||
verbose: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue