feat: self host minimal 2

This commit is contained in:
Ruben Fiszel
2022-05-08 17:51:33 +02:00
parent a27535f503
commit 8b824f25e9
4 changed files with 33 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
{$SITE_URL} {
bind {$ADDRESS}
reverse_proxy /* server:8000
reverse_proxy /* windmill:8000
}

View File

@@ -102,12 +102,17 @@ Windmill is <b>fully open-sourced</b>:
## How to self-host
`docker-compose up` with the following docker-compose is sufficient:
`docker volume create caddy_data && docker-compose up` with the following
docker-compose is sufficient:
<https://github.com/windmill-labs/windmill-server/blob/main/docker-compose.yml>
The default super-admin user is: admin@windmill.dev
The default super-admin user is: admin@windmill.dev / changeme
From there, you can create other users.
From there, you can create other users (do not forget to change the password!)
Detailed instructions for more complex deployments will come soon. For simpler
docker based ones, the docker-compose.yml file contains all the necessary
informations.
## Copyright

View File

@@ -7,6 +7,7 @@ services:
restart: always
volumes:
- db_data:/var/lib/postgresql/data
- ./init-db.sql:/docker-entrypoint-initdb.d/create_tables.sql
ports:
- 5432:5432
environment:

23
init-db.sql Normal file
View File

@@ -0,0 +1,23 @@
DO
$do$
BEGIN
IF NOT EXISTS (
SELECT
FROM pg_catalog.pg_roles
WHERE rolname = 'app') THEN
CREATE ROLE app LOGIN PASSWORD 'changeme';
END IF;
END
$do$;
DO
$do$
BEGIN
IF NOT EXISTS (
SELECT
FROM pg_catalog.pg_roles
WHERE rolname = 'admin') THEN
CREATE ROLE admin LOGIN PASSWORD 'changeme';
END IF;
END
$do$;