1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-12-01 05:43:04 +00:00

docs: add quick contributing instructions

هذا الالتزام موجود في:
Adam Cooke
2024-02-14 17:46:11 +00:00
ملتزم من قبل Adam Cooke
الأصل dc8e895bfe
التزام 8d21adcbd4
2 ملفات معدلة مع 87 إضافات و0 حذوفات

49
CONTRIBUTING.md Normal file
عرض الملف

@@ -0,0 +1,49 @@
# Contributing to Postal
This doc explains how to go about running Postal in development to allow you to make contributions to the project.
## Dependencies
You will need a MySQL database server to get started. Postal needs to be able to make databases within that server whenever new mail servers are created so the permissions that you use should be suitable for that.
You'll also need Ruby. Postal currently uses Ruby 3.2.1. Install that using whichever version manager takes your fancy - rbenv, asdf, rvm etc.
## Clone
You'll need to clone the repository
```
git clone git@github.com:postalserver/postal
```
Once cloned, you can install the Ruby dependencies using bundler.
```
bundle install
```
## Configuration
At present, configuration is handled using a config file. This lives in `config/postal/postal.yml`. An example configuration file is provided in `config/postal.example.yml`. This example is for development use only and not an example for production use.
You'll also need a key for signing. You can generate one of these like this:
```
openssl genrsa -out config/postal/signing.key 2048
```
## Running
The neatest way to run postal is to ensure that `./bin` is your `$PATH` and then use one of the following commands.
* `bin/dev` - will run all components of the application using Foreman
* `bin/postal` - will run the Postal binary providing access to running individual components or other tools.
## Database initialization
Use the commands below to initialize your database and make your first user.
```
postal initialize
postal make-user
```

38
config/postal.example.yml Normal file
عرض الملف

@@ -0,0 +1,38 @@
web:
host: postal.example.dev
protocol: https
web_server:
bind_address: 0.0.0.0
port: 4010
smtp_server:
port: 2525
logging:
rails_log: true
stdout: true
main_db:
host: 127.0.0.1
username: root
password:
database: postal
message_db:
host: 127.0.0.1
username: root
password:
prefix: postal
smtp:
host: 127.0.0.1
port: 2525
username:
password:
from_name: Postal
from_address: postal@yourdomain.com
rails:
environment: development
secret_key: 7f27856d26e864bafd49d0df37ad3d1339086e86ef0447e0f1814dde5277452fea97dab9e3aad6dfa11bfe359c82ce302d97bf1e58f6103c4408e4fbad4eeccf