Update selfhost.mdx

This commit is contained in:
dumbutdumber 2025-09-28 14:46:44 +05:30 committed by GitHub
parent 4530257ef5
commit ab088f6aff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,40 +14,29 @@
Create a new file named `docker-compose.yml` in your project directory and paste the following content into it:
```yaml
version: '3.8'
services:
postgres:
image: postgres
restart: unless-stopped
environment:
POSTGRES_USER: movie_web_user
POSTGRES_DB: movie_web_backend
POSTGRES_PASSWORD: YourPasswordHere
networks:
- p-stream-network
p-stream-backend:
image: ghcr.io/p-stream/backend:latest
restart: unless-stopped
environment:
MWB_SERVER__CORS: "https://movie-backend.example.tld https://movie.example.tld"
MWB_SERVER__PORT: 8080
MWB_POSTGRES__CONNECTION: postgresql://movie_web_user:YourPasswordHere@postgres:5432/movie_web_backend
MWB_CRYPTO__SESSION_SECRET: 32CHARACTERLONGSECRET
MWB_META__NAME: Server name
MWB_META__DESCRIPTION: Server Description
MWB_POSTGRES__MIGRATE_ON_BOOT: "true"
MWB_SERVER__TRUSTPROXY: "true"
MWB_SERVER__TRUSTCLOUDFLARE: "true"
# This is needed to resolve errors running migrations on some platforms - does not affect the application
MIKRO_ORM_MIGRATIONS_DISABLE_FOREIGN_KEYS: "false"
ports:
- "8080:8080"
depends_on:
- postgres
networks:
- p-stream-network
services:
postgres:
image: postgres
environment:
POSTGRES_USER: pstream_user
POSTGRES_DB: pstream
POSTGRES_PASSWORD: YourPasswordHere
ports:
- "5432:5432"
networks:
- p-stream-network
p-stream:
image: ghcr.io/dumbutdumber/backend:latest
environment:
DATABASE_URL: postgresql://pstream_user:YourPasswordHere@postgres:5432/pstream
CRYPTO_SECRET: 32CharacterLongStringHere
META_NAME: unofficial-backend
ports:
- "80:80"
depends_on:
- postgres
networks:
- p-stream-network
p-stream-frontend:
build: