mirror of
https://github.com/SaraSmiseth/prosody.git
synced 2025-05-04 13:10:38 +00:00
Add support for postgres, mariadb/mysql databases (#23)
* Add environment variables for Database configuration. * Install postgres and mysql dependencies. * Test refactoring * Run tests for prosody with postgres and also for prosody with sqlite. * Add tests that check if postgres or sqlite is used.
This commit is contained in:
parent
5bcf0fd3d0
commit
80216c5fdc
14 changed files with 153 additions and 49 deletions
|
@ -15,10 +15,39 @@ services:
|
|||
E2E_POLICY_WHITELIST: "admin@localhost, user1@localhost"
|
||||
LOG_LEVEL: debug
|
||||
PROSODY_ADMINS: "admin@localhost, admin2@localhost"
|
||||
extra_hosts:
|
||||
- "conference.localhost:127.0.0.1"
|
||||
- "pubsub.localhost:127.0.0.1"
|
||||
- "proxy.localhost:127.0.0.1"
|
||||
- "upload.localhost:127.0.0.1"
|
||||
volumes:
|
||||
- ./certs:/usr/local/etc/prosody/certs
|
||||
|
||||
prosody_postgres:
|
||||
image: prosody
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5000:5000"
|
||||
- "5222:5222"
|
||||
- "5223:5223"
|
||||
- "5269:5269"
|
||||
- "5281:5281"
|
||||
environment:
|
||||
DOMAIN: localhost
|
||||
E2E_POLICY_WHITELIST: "admin@localhost, user1@localhost"
|
||||
LOG_LEVEL: debug
|
||||
PROSODY_ADMINS: "admin@localhost, admin2@localhost"
|
||||
#DB_DRIVER: "MySQL"
|
||||
DB_DRIVER: "PostgreSQL"
|
||||
DB_DATABASE: "prosody"
|
||||
DB_HOST: "postgres"
|
||||
DB_PORT: "5432"
|
||||
DB_USERNAME: "prosody"
|
||||
DB_PASSWORD: "prosody"
|
||||
volumes:
|
||||
- ./certs:/usr/local/etc/prosody/certs
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
postgres:
|
||||
image: postgres:13-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: prosody
|
||||
POSTGRES_USER: prosody
|
||||
POSTGRES_PASSWORD: prosody
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue