You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-07-17 01:32:29 +02:00
docker-compose variables and setup
This commit is contained in:
@ -10,8 +10,10 @@ RUN apk add --no-cache git \
|
|||||||
COPY server.py ./server.py
|
COPY server.py ./server.py
|
||||||
COPY setup.py ./setup.py
|
COPY setup.py ./setup.py
|
||||||
COPY main.py ./main.py
|
COPY main.py ./main.py
|
||||||
|
COPY flavors /data/master/flavors
|
||||||
|
COPY templates /data/master/templates
|
||||||
|
|
||||||
RUN python setup.py https://github.com/mailu/mailu /data
|
#RUN python setup.py https://github.com/mailu/mailu /data
|
||||||
|
|
||||||
EXPOSE 80/tcp
|
EXPOSE 80/tcp
|
||||||
|
|
||||||
|
@ -10,4 +10,5 @@ services:
|
|||||||
image: mailu/setup
|
image: mailu/setup
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
|
build: .
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
{% for port in (80, 443, 25, 465, 587, 110, 995, 143, 993) %}
|
{% for port in (80, 443, 25, 465, 587, 110, 995, 143, 993) %}
|
||||||
{% if bind4 %}
|
{% if bind4 %}
|
||||||
- "{{ bind4}}:{{ port }}:{{ port }}"
|
- "{{ bind4 }}:{{ port }}:{{ port }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if bind6 %}
|
{% if bind6 %}
|
||||||
- "{{ bind6 }}:{{ port }}:{{ port }}"
|
- "{{ bind6 }}:{{ port }}:{{ port }}"
|
||||||
|
@ -10,15 +10,15 @@
|
|||||||
|
|
||||||
# Set this to the path where Mailu data and configuration is stored
|
# Set this to the path where Mailu data and configuration is stored
|
||||||
# This variable is now set directly in `docker-compose.yml by the setup utility
|
# This variable is now set directly in `docker-compose.yml by the setup utility
|
||||||
# ROOT=/mailu
|
# ROOT= {{ root }}
|
||||||
|
|
||||||
# Set to a randomly generated 16 bytes string
|
# Set to a randomly generated 16 bytes string
|
||||||
SECRET_KEY={{ secret(16) }}
|
SECRET_KEY={{ secret(16) }}
|
||||||
|
|
||||||
# Address where listening ports should bind
|
# Address where listening ports should bind
|
||||||
# This variables are now set directly in `docker-compose.yml by the setup utility
|
# This variables are now set directly in `docker-compose.yml by the setup utility
|
||||||
# PUBLIC_IPV4=127.0.0.1
|
# PUBLIC_IPV4= {{ bind4 }} (default: 127.0.0.1)
|
||||||
# PUBLIC_IPV6=::1
|
# PUBLIC_IPV6= {{ bind6 }} (default: ::1)
|
||||||
|
|
||||||
# Mail address of the postmaster
|
# Mail address of the postmaster
|
||||||
POSTMASTER={{ postmaster }}
|
POSTMASTER={{ postmaster }}
|
||||||
@ -83,7 +83,7 @@ WEB_ADMIN={{ admin_path }}
|
|||||||
WEB_WEBMAIL={{ webmail_path }}
|
WEB_WEBMAIL={{ webmail_path }}
|
||||||
|
|
||||||
# Website name
|
# Website name
|
||||||
SITENAME={{ site_name }{
|
SITENAME={{ site_name }}
|
||||||
|
|
||||||
# Linked Website URL
|
# Linked Website URL
|
||||||
WEBSITE={{ website }}
|
WEBSITE={{ website }}
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
<p>Docker Compose expects a project file, named <code>docker-compose.yml</code>
|
<p>Docker Compose expects a project file, named <code>docker-compose.yml</code>
|
||||||
in a project directory. First create your project directory.</p>
|
in a project directory. First create your project directory.</p>
|
||||||
|
|
||||||
<pre><code>mkdir /mailu
|
<pre><code>mkdir {{ root }}
|
||||||
</pre></code>
|
</pre></code>
|
||||||
|
|
||||||
<p>Then download the project file. A side configuration file makes it easier
|
<p>Then download the project file. A side configuration file makes it easier
|
||||||
to read and check the configuration variables generated by the wizard.</p>
|
to read and check the configuration variables generated by the wizard.</p>
|
||||||
|
|
||||||
<pre><code>cd /mailu
|
<pre><code>cd {{ root }}
|
||||||
wget {{ url_for('.file', uid=uid, filepath='docker-compose.yml', _external=True) }}
|
wget {{ url_for('.file', uid=uid, filepath='docker-compose.yml', _external=True) }}
|
||||||
wget {{ url_for('.file', uid=uid, filepath='mailu.env', _external=True) }}
|
wget {{ url_for('.file', uid=uid, filepath='mailu.env', _external=True) }}
|
||||||
</pre></code>
|
</pre></code>
|
||||||
@ -30,7 +30,7 @@ files before going any further.</p>
|
|||||||
<p>To start your compose project, simply run the Docker Compose <code>up</code>
|
<p>To start your compose project, simply run the Docker Compose <code>up</code>
|
||||||
command.</p>
|
command.</p>
|
||||||
|
|
||||||
<pre><code>cd /mailu
|
<pre><code>cd {{ root }}
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
</pre></code>
|
</pre></code>
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
@ -32,9 +32,11 @@ def secret(length=16):
|
|||||||
|
|
||||||
def build_app(path):
|
def build_app(path):
|
||||||
|
|
||||||
|
#Hardcoded master as the only version for test purposes
|
||||||
versions = [
|
versions = [
|
||||||
version for version in os.listdir(path)
|
# version for version in os.listdir(path)
|
||||||
if os.path.isdir(os.path.join(path, version))
|
# if os.path.isdir(os.path.join(path, version))
|
||||||
|
"master"
|
||||||
]
|
]
|
||||||
|
|
||||||
app.jinja_env.trim_blocks = True
|
app.jinja_env.trim_blocks = True
|
||||||
|
@ -14,12 +14,12 @@ avoid generic all-interfaces addresses like <code>0.0.0.0</code> or <code>::</co
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>IPv4 listen address</label>
|
<label>IPv4 listen address</label>
|
||||||
<input class="form-control" type="text" name="ip4" placeholder="1.2.3.4">
|
<input class="form-control" type="text" name="bind4" placeholder="1.2.3.4">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>IPv6 listen address</label>
|
<label>IPv6 listen address</label>
|
||||||
<input class="form-control" type="text" name="ip6" placeholder="2001:be4:1234::1">
|
<input class="form-control" type="text" name="bind6" placeholder="2001:be4:1234::1">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>You server will be available under a main hostname but may expose multiple public
|
<p>You server will be available under a main hostname but may expose multiple public
|
||||||
|
8
setup/templates/steps/root.html
Normal file
8
setup/templates/steps/root.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{% call macros.panel("info", "Step 0 - Set root path") %}
|
||||||
|
<p>Before starting root path must be set</p>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Root path: </label>
|
||||||
|
<input class="form-control" type="text" name="root" placeholder="/mailu">
|
||||||
|
</div>
|
||||||
|
{% endcall %}
|
@ -9,6 +9,7 @@
|
|||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|
||||||
<form method="post" action="{{ url_for(".submit") }}">
|
<form method="post" action="{{ url_for(".submit") }}">
|
||||||
|
{% include "steps/root.html" %}
|
||||||
{% include "steps/flavor.html" %}
|
{% include "steps/flavor.html" %}
|
||||||
{% include "steps/expose.html" %}
|
{% include "steps/expose.html" %}
|
||||||
{% include "steps/services.html" %}
|
{% include "steps/services.html" %}
|
||||||
|
Reference in New Issue
Block a user