diff --git a/docker/config/Dockerfile.psql b/docker/config/Dockerfile.psql new file mode 100644 index 00000000..a0cf1387 --- /dev/null +++ b/docker/config/Dockerfile.psql @@ -0,0 +1,4 @@ +from postgres:16 + +# Copy the Init script +COPY ./init-user-db.sh /docker-entrypoint-initdb.d/ diff --git a/docker/docker-compose-dev.yml b/docker/docker-compose-dev.yml index 63257b2c..bb687436 100644 --- a/docker/docker-compose-dev.yml +++ b/docker/docker-compose-dev.yml @@ -21,13 +21,12 @@ services: - MINIO_ROOT_PASSWORD=CHANGEME - MINIO_DEFAULT_BUCKETS=pixeleye postgres: - image: postgres:latest + build: + context: ./config + dockerfile: ./Dockerfile.psql restart: unless-stopped volumes: - postgres-data:/var/lib/postgresql/data - - type: bind - source: ./config/init-user-db.sh - target: /docker-entrypoint-initdb.d/init-user-db.sh environment: - POSTGRES_USER=guest diff --git a/docker/docker-compose-self-hosting.yml b/docker/docker-compose-self-hosting.yml index efef88ad..099db753 100644 --- a/docker/docker-compose-self-hosting.yml +++ b/docker/docker-compose-self-hosting.yml @@ -20,13 +20,12 @@ services: - MINIO_ROOT_PASSWORD=CHANGEME - MINIO_DEFAULT_BUCKETS=pixeleye postgres: - image: postgres:latest + build: + context: ./config + dockerfile: ./Dockerfile.psql restart: unless-stopped volumes: - postgres-data:/var/lib/postgresql/data - - type: bind - source: ./config/init-user-db.sh - target: /docker-entrypoint-initdb.d/init-user-db.sh environment: - POSTGRES_USER=guest diff --git a/docs/04-guides/01-self-hosting.md b/docs/04-guides/01-self-hosting.md index c8f9d344..059f38f7 100644 --- a/docs/04-guides/01-self-hosting.md +++ b/docs/04-guides/01-self-hosting.md @@ -26,7 +26,8 @@ This docker file requires the files found in this [config folder](https://github ### Quick start 1. Copy [`docker-compose-self-hosting.yml`](https://github.com/pixeleye-io/pixeleye/tree/main/docker/docker-compose-self-hosting.yml) & everything from [`./config`](https://github.com/pixeleye-io/pixeleye/tree/main/docker/config) to your server. -2. run `docker compose -f docker-compose-self-hosting.yml up` +2. Run `docker compose -f docker-compose-self-hosting.yml up` +3. After docker has started, you can access Pixeleye at `http://localhost:3000`. > Make sure you have the [./config folder](https://github.com/pixeleye-io/pixeleye/tree/main/docker/config) folder in the same directory as the docker-compose file.