Skip to content

Commit

Permalink
Merge pull request #320 from pixeleye-io/fix-self-hosting-permissions
Browse files Browse the repository at this point in the history
Reworking postgres init script
  • Loading branch information
AlfieJones authored Jun 14, 2024
2 parents 49b692d + fdb7831 commit 0fb210f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
4 changes: 4 additions & 0 deletions docker/config/Dockerfile.psql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from postgres:16

# Copy the Init script
COPY ./init-user-db.sh /docker-entrypoint-initdb.d/
7 changes: 3 additions & 4 deletions docker/docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions docker/docker-compose-self-hosting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion docs/04-guides/01-self-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0fb210f

Please sign in to comment.