-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into lua-dovecot-fix-quota
- Loading branch information
Showing
7 changed files
with
131 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.git | ||
.github | ||
.vscode | ||
ansible | ||
build | ||
docs | ||
var | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ MAILER_DELIVERY_ADDRESS="[email protected]" | |
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" | ||
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=8&charset=utf8mb4" | ||
# DATABASE_URL="postgresql://app:[email protected]:5432/app?serverVersion=14&charset=utf8" | ||
DATABASE_URL="mysql://mail:password@127.0.0.1:3306/mail?charset=utf8mb4" | ||
DATABASE_URL="mysql://mail:password@mariadb:3306/mail?charset=utf8mb4" | ||
###< doctrine/doctrine-bundle ### | ||
|
||
### Enable retention API ### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM composer:2.8.3 AS composer | ||
|
||
|
||
FROM php:8.2-cli AS builder | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y libzip-dev nodejs npm zip | ||
RUN docker-php-ext-install -j$(nproc) zip | ||
|
||
COPY . /var/www/html/ | ||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
|
||
WORKDIR /var/www/html | ||
|
||
RUN composer install --no-scripts && \ | ||
npm install --global yarn && \ | ||
yarn install && \ | ||
yarn encore production && \ | ||
bin/console assets:install | ||
|
||
|
||
FROM php:8.2-apache-bookworm | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y libpng-dev libsodium-dev libsqlite3-dev libzip-dev zlib1g-dev zip | ||
RUN docker-php-ext-install -j$(nproc) gd opcache pdo_mysql pdo_sqlite sodium zip | ||
|
||
COPY --from=builder /var/www/html /var/www/html | ||
COPY contrib/apache.conf /etc/apache2/sites-available/000-default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<VirtualHost *:80> | ||
|
||
DocumentRoot /var/www/html/public | ||
|
||
<Directory /var/www/html/public> | ||
AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,Includes,Indexes,SymLinksIfOwnerMatch,MultiViews | ||
Options -Indexes -MultiViews +SymLinksIfOwnerMatch | ||
|
||
LimitRequestBody 10485760 | ||
|
||
</Directory> | ||
|
||
<Directory /var/www/html/public/.well-known> | ||
Require all granted | ||
</Directory> | ||
|
||
SetEnv APP_ENV dev | ||
|
||
<IfModule fcgid_module> | ||
AddHandler fcgid-script .php | ||
FCGIWrapper /var/www/users.example.org/php-fcgi/php-fcgi-starter .php | ||
|
||
IPCConnectTimeout 20 | ||
IPCCommTimeout 60 | ||
FcgidBusyTimeout 60 | ||
MaxRequestLen 10485760 | ||
|
||
<Directory /var/www/html/public> | ||
Options +ExecCGI | ||
</Directory> | ||
</IfModule> | ||
|
||
ErrorLog "|/usr/bin/logger -t apache -p local0.error" | ||
|
||
Protocols h2 http/1.1 | ||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
--- | ||
services: | ||
mysql: | ||
image: mariadb:10.11 | ||
userli: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- '3306:3306' | ||
- 8000:80 | ||
networks: | ||
- userli | ||
|
||
mariadb: | ||
image: mariadb:10.11 | ||
environment: | ||
MYSQL_USER: mail | ||
MYSQL_PASSWORD: password | ||
MYSQL_DATABASE: mail | ||
MARIADB_RANDOM_ROOT_PASSWORD: true | ||
volumes: | ||
- mysql:/var/lib/mysql | ||
- mariadb:/var/lib/mysql | ||
networks: | ||
- userli | ||
|
||
networks: | ||
userli: | ||
|
||
volumes: | ||
mysql: | ||
mariadb: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,38 @@ | ||
# Getting Started | ||
|
||
The easiest way to install Userli on a fresh Debian Buster is running these commands: | ||
The easiest way to get started with Userli is to use podman or docker. | ||
We provide a `docker-compose.yml` file that starts Userli and MariaDB. | ||
This is not recommended for production use, but it is a good way to get started. | ||
|
||
# install dependencies | ||
sudo apt update && sudo apt install -y ansible git python3-pip | ||
sudo pip3 install molecule # re-run in case of error | ||
!!! info | ||
If you don't have podman or docker installed, you can find the installation instructions on the [podman website](https://podman.io/getting-started/installation) or the [docker website](https://docs.docker.com/get-docker/). | ||
|
||
# get code | ||
git clone https://github.com/systemli/ansible-role-userli.git | ||
cd ansible-role-userli | ||
1. Start Userli and MariaDB with podman or docker: | ||
|
||
Using podman: | ||
|
||
# install apache2, mariadb, php8.0 and userli | ||
sudo molecule converge -s localhost | ||
```shell | ||
podman compose up -d --build | ||
``` | ||
|
||
This installs all dependencies, creates a database and database user | ||
(name: userli, password: userli), and installs the userli code at `/var/www/userli`. | ||
It is accessible via [http://localhost:8080](http://localhost:8080). | ||
There, you can create the first domain and user for your instance. | ||
Using docker: | ||
|
||
!!! warning | ||
Do not run this configuration in production. | ||
```shell | ||
docker-compose up -d --build | ||
``` | ||
|
||
Next, you would have to change the password of the database user, | ||
[configure your instance](../installation/configuration), | ||
and probably install Dovecot to do anything meaningful. | ||
2. Initialize the database: | ||
|
||
Better, do a [manual installation](../installation) to understand each part of your | ||
configuration. | ||
Using podman: | ||
|
||
```shell | ||
podman exec userli bin/console doctrine:schema:create | ||
``` | ||
|
||
Using docker: | ||
|
||
```shell | ||
docker exec userli bin/console doctrine:schema:create | ||
``` | ||
|
||
3. Open your browser and go to [http://localhost:8000](http://localhost:8000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters