Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Sympa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NoCloud
docker
Sympa
Commits
4bcfa932
Commit
4bcfa932
authored
2 years ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Add remote ip detection for fail2ban
parent
a236a767
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.env.sample
+3
-0
3 additions, 0 deletions
.env.sample
docker-compose.yml
+3
-0
3 additions, 0 deletions
docker-compose.yml
docker/sympa/Dockerfile
+14
-0
14 additions, 0 deletions
docker/sympa/Dockerfile
docker/sympa/entrypoint.sh
+3
-0
3 additions, 0 deletions
docker/sympa/entrypoint.sh
with
23 additions
and
0 deletions
.env.sample
+
3
−
0
View file @
4bcfa932
...
@@ -16,3 +16,6 @@ MY_NETWORKS=localhost 127.0.0.0/8 10.42.0.0/16
...
@@ -16,3 +16,6 @@ MY_NETWORKS=localhost 127.0.0.0/8 10.42.0.0/16
ROOT_ALIAS=admin@FQDN
ROOT_ALIAS=admin@FQDN
MY_DESTINATION=postfix.FQDN
MY_DESTINATION=postfix.FQDN
REMOTES=postfix
REMOTES=postfix
TRUSTED_HOSTS=sympa postfix
TRUSTED_PROXY=traefik
TZ=Europe/Paris
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
3
−
0
View file @
4bcfa932
...
@@ -26,6 +26,8 @@ services:
...
@@ -26,6 +26,8 @@ services:
SYMPA_DB_NAME
:
SYMPA_DB_NAME
:
SYMPA_DB_USER
:
SYMPA_DB_USER
:
SYMPA_DB_PASSWD
:
SYMPA_DB_PASSWD
:
TZ
:
TRUSTED_PROXY
:
REMOTES
:
REMOTES
:
networks
:
networks
:
-
postfix
-
postfix
...
@@ -50,6 +52,7 @@ services:
...
@@ -50,6 +52,7 @@ services:
ROOT_ALIAS
:
ROOT_ALIAS
:
MY_DESTINATION
:
MY_DESTINATION
:
TRUSTED_HOSTS
:
TRUSTED_HOSTS
:
TZ
:
pgsql
:
pgsql
:
...
...
This diff is collapsed.
Click to expand it.
docker/sympa/Dockerfile
+
14
−
0
View file @
4bcfa932
...
@@ -4,12 +4,14 @@ ENV DEBIAN_FRONTEND noninteractive
...
@@ -4,12 +4,14 @@ ENV DEBIAN_FRONTEND noninteractive
RUN
apt-get
-y
update
&&
apt-get
-y
upgrade
&&
apt-get
-y
install
\
RUN
apt-get
-y
update
&&
apt-get
-y
upgrade
&&
apt-get
-y
install
\
apache2
\
apache2
\
dnsutils
\
inetutils-syslogd
\
inetutils-syslogd
\
libapache2-mod-fcgid
\
libapache2-mod-fcgid
\
libdbd-pg-perl
\
libdbd-pg-perl
\
libfcgi-perl
\
libfcgi-perl
\
libnet-ldap-perl
\
libnet-ldap-perl
\
libio-socket-ssl-perl
\
libio-socket-ssl-perl
\
locales
\
nullmailer
\
nullmailer
\
openssh-server
\
openssh-server
\
spawn-fcgi
\
spawn-fcgi
\
...
@@ -29,10 +31,22 @@ COPY default.conf /etc/apache2/sites-available/000-default.conf
...
@@ -29,10 +31,22 @@ COPY default.conf /etc/apache2/sites-available/000-default.conf
RUN
a2enmod rewrite substitute
alias
proxy proxy_fcgi
RUN
a2enmod rewrite substitute
alias
proxy proxy_fcgi
RUN
a2enmod remoteip
RUN
echo
'RemoteIPHeader X-Forwarded-For'
>
/etc/apache2/conf-available/remoteip.conf
COPY
supervisord.conf /etc/supervisor/conf.d
COPY
supervisord.conf /etc/supervisor/conf.d
COPY
run.sh /opt/sympa_run.sh
COPY
run.sh /opt/sympa_run.sh
COPY
entrypoint.sh /entrypoint
COPY
entrypoint.sh /entrypoint
RUN
sed
-i
'/en_US.UTF-8/s/^# //g'
/etc/locale.gen
&&
locale-gen
ENV
LANG en_US.UTF-8
ENV
LANGUAGE en_US:en
ENV
LC_ALL en_US.UTF-8
ENTRYPOINT
/entrypoint
ENTRYPOINT
/entrypoint
This diff is collapsed.
Click to expand it.
docker/sympa/entrypoint.sh
+
3
−
0
View file @
4bcfa932
...
@@ -83,6 +83,9 @@ if [ -n "$SYMPA_DOMAIN" ]; then
...
@@ -83,6 +83,9 @@ if [ -n "$SYMPA_DOMAIN" ]; then
echo
"
$SYMPA_DOMAIN
"
>
/etc/mailname
echo
"
$SYMPA_DOMAIN
"
>
/etc/mailname
echo
"
$SYMPA_DOMAIN
"
>
/etc/nullmailer/defaultdomain
echo
"
$SYMPA_DOMAIN
"
>
/etc/nullmailer/defaultdomain
fi
fi
proxy
=
$(
dig +short
$TRUSTED_PROXY
)
echo
"RemoteIPTrustedProxy
$proxy
"
>>
/etc/apache2/conf-available/remoteip.conf
a2enconf remoteip
mkdir
-p
/var/log/supervisor/
mkdir
-p
/var/log/supervisor/
# Launch all services
# Launch all services
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment