Dokumentacja

Apps

Libraries

Getting Started

Requirements

https://symfony.com/doc/6.1/reference/requirements.html

  • PHP version: 8.1 or higher
  • GD or Imagemagick php extension
  • NGINX / Apache / Caddy
  • PostgreSQL
  • Redis (optional)
  • Mercure (optional)
  • RabbitMQ (optional)
  • Elasticsearch (optional)
  • Cardano Node, Cardano Wallet (optional)

Frontend

https://github.com/symfony/ux

$ yarn install
$ yarn build

Install with Docker

Based on https://github.com/dunglas/symfony-docker

Develop

# Set SMTP, Postgres, Mercure, Elasticsearch, RabbitMQ creds if you need it.
$ cp .env.example .env

$ docker-compose build --pull --no-cache
$ docker-compose up

$ docker-compose exec php bin/console doctrine:fixtures:load
$ docker-compose exec php bin/phpunit

Production

$ SERVER_NAME="beta.karab.in" \
APP_SECRET=427f5e2940e5b2472c1b44b2d06e0525 \
CADDY_MERCURE_JWT_SECRET='!ChangeMe!' \
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

Deploying on Multiple Nodes

If you want to deploy your app on a cluster of machines, you can use Docker Swarm, which is compatible with the provided Compose files.

Configuration

Admin user

# Create new user (without email verification)
$ docker-compose exec php bin/console kbin:user:create username [email protected] password
# Grant administrator privileges
$ docker-compose exec php bin/console kbin:user:admin username

Elasticsearch

$ docker-compose exec php bin/console fos:elastica:create
$ docker-compose exec php bin/console fos:elastica:populate

JWT keys

// @todo 

Next, set up your instance https://localhost/admin

Backup and restore

Database

# Backup
$ docker exec -it [container_id] pg_dump -U kbin kbin > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
# Restore
$ docker exec -it [container_id] psql kbin < dump.sql // @todo

Images

// @todo rsync

Troubleshooting

Logs

$ docker-compose logs -f
$ docker-compose exec php tail var/log/prod.log

Cache

$ docker-compose exec php bin/console cache:clear

Federation

Official Documents

Unofficial Sources

Documentation

Contributing

License

AGPL-3.0 license