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:
|
services:
|
||||||
caddy:
|
caddy:
|
||||||
image: caddy:latest
|
image: caddy:2.10.0
|
||||||
container_name: caddy
|
container_name: caddy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
|
@ -21,7 +21,7 @@ services:
|
||||||
|
|
||||||
clickhouse:
|
clickhouse:
|
||||||
container_name: clickhouse
|
container_name: clickhouse
|
||||||
image: clickhouse/clickhouse-server:latest
|
image: clickhouse/clickhouse-server:25.4.2
|
||||||
ports:
|
ports:
|
||||||
- "8123:8123"
|
- "8123:8123"
|
||||||
- "9000:9000"
|
- "9000:9000"
|
||||||
|
@ -41,7 +41,7 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:latest
|
image: postgres:17.4
|
||||||
container_name: postgres
|
container_name: postgres
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: frog
|
POSTGRES_USER: frog
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
services:
|
services:
|
||||||
caddy:
|
caddy:
|
||||||
image: caddy:latest
|
image: caddy:2.10.0
|
||||||
container_name: caddy
|
container_name: caddy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
|
@ -21,7 +21,7 @@ services:
|
||||||
|
|
||||||
clickhouse:
|
clickhouse:
|
||||||
container_name: clickhouse
|
container_name: clickhouse
|
||||||
image: clickhouse/clickhouse-server:latest
|
image: clickhouse/clickhouse-server:25.4.2
|
||||||
ports:
|
ports:
|
||||||
- "8123:8123"
|
- "8123:8123"
|
||||||
- "9000:9000"
|
- "9000:9000"
|
||||||
|
@ -41,7 +41,7 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:latest
|
image: postgres:17.4
|
||||||
container_name: postgres
|
container_name: postgres
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: frog
|
POSTGRES_USER: frog
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
services:
|
services:
|
||||||
caddy:
|
caddy:
|
||||||
image: caddy:latest
|
image: caddy:2.10.0
|
||||||
container_name: caddy
|
container_name: caddy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
|
@ -21,7 +21,7 @@ services:
|
||||||
|
|
||||||
clickhouse:
|
clickhouse:
|
||||||
container_name: clickhouse
|
container_name: clickhouse
|
||||||
image: clickhouse/clickhouse-server:latest
|
image: clickhouse/clickhouse-server:25.4.2
|
||||||
ports:
|
ports:
|
||||||
- "8123:8123"
|
- "8123:8123"
|
||||||
- "9000:9000"
|
- "9000:9000"
|
||||||
|
@ -29,9 +29,9 @@ services:
|
||||||
- clickhouse-data:/var/lib/clickhouse
|
- clickhouse-data:/var/lib/clickhouse
|
||||||
- ./clickhouse_config:/etc/clickhouse-server/config.d
|
- ./clickhouse_config:/etc/clickhouse-server/config.d
|
||||||
environment:
|
environment:
|
||||||
- CLICKHOUSE_DB=analytics
|
- CLICKHOUSE_DB=${CLICKHOUSE_DB:-analytics}
|
||||||
- CLICKHOUSE_USER=default
|
- CLICKHOUSE_USER=${CLICKHOUSE_USER:-default}
|
||||||
- CLICKHOUSE_PASSWORD=frog
|
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-frog}
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8123/ping"]
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8123/ping"]
|
||||||
interval: 3s
|
interval: 3s
|
||||||
|
@ -41,12 +41,12 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:latest
|
image: postgres:17.4
|
||||||
container_name: postgres
|
container_name: postgres
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: frog
|
- POSTGRES_USER=${POSTGRES_USER:-frog}
|
||||||
POSTGRES_PASSWORD: frog
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-frog}
|
||||||
POSTGRES_DB: analytics
|
- POSTGRES_DB=${POSTGRES_DB:-analytics}
|
||||||
volumes:
|
volumes:
|
||||||
- postgres-data:/var/lib/postgresql/data
|
- postgres-data:/var/lib/postgresql/data
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -59,13 +59,13 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- CLICKHOUSE_HOST=http://clickhouse:8123
|
- CLICKHOUSE_HOST=http://clickhouse:8123
|
||||||
- CLICKHOUSE_DB=analytics
|
- CLICKHOUSE_DB=${CLICKHOUSE_DB:-analytics}
|
||||||
- CLICKHOUSE_PASSWORD=frog
|
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-frog}
|
||||||
- POSTGRES_HOST=postgres
|
- POSTGRES_HOST=postgres
|
||||||
- POSTGRES_PORT=5432
|
- POSTGRES_PORT=5432
|
||||||
- POSTGRES_DB=analytics
|
- POSTGRES_DB=${POSTGRES_DB:-analytics}
|
||||||
- POSTGRES_USER=frog
|
- POSTGRES_USER=${POSTGRES_USER:-frog}
|
||||||
- POSTGRES_PASSWORD=frog
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-frog}
|
||||||
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
|
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
|
||||||
- BASE_URL=${BASE_URL}
|
- BASE_URL=${BASE_URL}
|
||||||
- DISABLE_SIGNUP=${DISABLE_SIGNUP}
|
- DISABLE_SIGNUP=${DISABLE_SIGNUP}
|
||||||
|
|
|
@ -9,10 +9,10 @@ export default defineConfig({
|
||||||
dialect: "postgresql",
|
dialect: "postgresql",
|
||||||
dbCredentials: {
|
dbCredentials: {
|
||||||
host: process.env.POSTGRES_HOST || "postgres",
|
host: process.env.POSTGRES_HOST || "postgres",
|
||||||
port: 5432,
|
port: process.env.POSTGRES_PORT || 5432,
|
||||||
database: "analytics",
|
database: process.env.POSTGRES_DB || "analytics",
|
||||||
user: "frog",
|
user: process.env.POSTGRES_USER || "frog",
|
||||||
password: "frog",
|
password: process.env.POSTGRES_PASSWORD || "frog",
|
||||||
ssl: false,
|
ssl: false,
|
||||||
},
|
},
|
||||||
verbose: true,
|
verbose: true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue