File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,7 @@ COPY --chown=postgres:postgres docker/all-in-one/etc/postgresql.schema.sql /etc/
179
179
# Customizations for postgres_exporter
180
180
COPY --chown=postgres:postgres docker/all-in-one/opt/postgres_exporter/queries.yml /opt/postgres_exporter/queries.yml
181
181
182
+ # Customizations for fail2ban
182
183
COPY docker/all-in-one/etc/fail2ban/filter.d /etc/fail2ban/filter.d/
183
184
COPY docker/all-in-one/etc/fail2ban/jail.d /etc/fail2ban/jail.d/
184
185
Original file line number Diff line number Diff line change @@ -227,21 +227,26 @@ find /etc/supervisor/ -type d -exec chmod 0770 {} +
227
227
find /etc/supervisor/ -type f -exec chmod 0660 {} +
228
228
229
229
# Start services in the background
230
- if [ -z " ${POSTGRES_ONLY:- } " ]; then
231
- sed -i " s| # - postgrest| - postgrest|g" /etc/adminapi/adminapi.yaml
232
- sed -i " s|files = db-only/\*.conf|files = services/\*.conf db-only/\*.conf|g" $SUPERVISOR_CONF
233
- configure_services
234
- else
230
+ if [ " ${POSTGRES_ONLY:- } " == " true" ]; then
235
231
sed -i " s| - postgrest| # - postgrest|g" /etc/adminapi/adminapi.yaml
236
232
sed -i " s|files = services/\*.conf db-only/\*.conf|files = db-only/\*.conf|g" $SUPERVISOR_CONF
237
233
/init/configure-adminapi.sh
234
+ else
235
+ sed -i " s| # - postgrest| - postgrest|g" /etc/adminapi/adminapi.yaml
236
+ sed -i " s|files = db-only/\*.conf|files = services/\*.conf db-only/\*.conf|g" $SUPERVISOR_CONF
237
+ configure_services
238
238
fi
239
239
240
- if [ " ${AUTOSHUTDOWN_ENABLED:- } " ]; then
240
+ if [ " ${AUTOSHUTDOWN_ENABLED:- } " == " true " ]; then
241
241
sed -i " s/autostart=.*/autostart=true/" /etc/supervisor/db-only/supa-shutdown.conf
242
242
fi
243
243
244
- if [ " ${PLATFORM_DEPLOYMENT:- } " ]; then
244
+ if [ " ${FAIL2BAN_DISABLED:- } " == " true" ]; then
245
+ sed -i " s/autostart=.*/autostart=false/" /etc/supervisor/services/fail2ban.conf
246
+ sed -i " s/autorestart=.*/autorestart=false/" /etc/supervisor/services/fail2ban.conf
247
+ fi
248
+
249
+ if [ " ${PLATFORM_DEPLOYMENT:- } " == " true" ]; then
245
250
enable_swap
246
251
create_lsn_checkpoint_file
247
252
fi
You can’t perform that action at this time.
0 commit comments