Install production
Public internet server install
Make sure you have completed the minimum installation procedures before proceeding.
You will need a server with a public accessible IP associated with an https URL with a valid security certificate.
Change the minimum required settings
Edit the .env file and setup it. It is strongly recommended to change at least:
| Field | Description | Example |
|---|---|---|
| DOMAIN | The Superchat API domain | superchat.mydomain.com |
| BACKEND_CORS_ORIGINS | Change the superchat.com in the list to your domain | superchat.mydomain.com |
| SECRET_KEY | The secret key for generating encryption | Use this command to generate an secore one: openssl rand -hex 32 |
| FIRST_SUPERUSER | The superuser login | superuser@mydomain.com |
| FIRST_SUPERUSER_PASSWORD | The superuser password | PleaseUseGodPasswords#29#21 |
| SMTP_TLS | Email server requires secure connection | True |
| SMTP_PORT | SMTP port of the mail server | 587 |
| SMTP_HOST | Email server address | smtp.gmail.com |
| SMTP_USER | Email server sender login | youremail@gmail.com |
| SMTP_PASSWORD | Email server sender login | YetAnotherGodPasswords#29#21 |
| EMAILS_FROM_EMAIL | The email that will send the messages | youremail@gmail.com |
| BUCKET_FS | The bucket on the S3 object server used to store images, sounds, etc. | cklfsz3ms0000vcxurnih6jig |
| BUCKET_PUBLIC_DOMAIN | The public address of your bucket. Necessary for sending messages with media such as images and others. | superchat.mydomain.com/localstack |
| POSTGRES_PASSWORD | The password for the user defined in POSTGRES_USER | DbUserPasswordMustBeStrong |
| POSTGRES_DB | The name of the Superchat database | superchat |
| PGADMIN_DEFAULT_EMAIL | The PgAdmin superuser login | superuser@mydomain.com |
| PGADMIN_DEFAULT_PASSWORD | The Superchat API domain | SomeOtherGoodPAssword |
| REDIS_PASSWORD | Redis server auth password | YesUseAnotherGoddPassword |
| AWS_ACCESS_KEY_ID | The S3 server access key | cklft91g90000suxuk006ixq5 |
| AWS_SECRET_ACCESS_KEY | The S3 server secret | cklft9osw000001xuj157mwgz |
Start the docker-compose stack
docker-compose -f docker-compose.dev.yml up -d
Be warned that in a real production environment, especially if you are going to use the integration with Whatsapp, the ideal is to use a dedicated Postgres server and similarly to the S3 server.