This commit is contained in:
Danny Houtworm 2023-08-14 01:23:48 +00:00
parent 529da17046
commit cdfc82cf3f
6 changed files with 22 additions and 6 deletions

View File

@ -7,3 +7,5 @@ WPADMINEMAIL=danny@houtworm.email
WPUSERUSER=user42
WPUSERPASSWD=password
WPUSEREMAIL=user42@houtworm.email
FTPUSER=djonker
FTPPASSWD=password

View File

@ -53,6 +53,9 @@ services:
ipv4_address: 172.20.30.30
ftp:
build: ./requirements/ftp
environment:
- FTPUSER=${FTPUSER}
- FTPPASSWD=${FTPPASSWD}
container_name: ftp
restart: always
volumes:
@ -76,6 +79,10 @@ services:
networks:
wordpress:
ipv4_address: 172.20.30.50
fail2ban:
build: ./requirements/fail2ban
container_name: fail2ban
restart: always
networks:
wordpress:

View File

@ -0,0 +1,6 @@
FROM alpine
RUN sleep 10
RUN apk update
RUN apk add fail2ban
WORKDIR /root/
CMD sleep 1000000

View File

@ -1,13 +1,12 @@
FROM alpine
ARG FTPUSER=${FTPUSER}
ARG FTPPASSWD=${FTPPASSWD}
RUN sleep 10
RUN apk update
RUN apk add openssl
RUN apk add pure-ftpd
COPY srcs/start.sh /root/start.sh
WORKDIR /root/
COPY srcs/pure-ftpd.conf /etc/pure-ftp.conf
RUN adduser --disabled-password admin
RUN echo "admin:password" | chpasswd
CMD pure-ftpd -p 21000:21000 -P 127.0.0.1
CMD sh start.sh
EXPOSE 21/tcp
EXPOSE 20/tcp
EXPOSE 21000/tcp

View File

@ -0,0 +1,3 @@
adduser --disabled-password ${FTPUSER}
echo "${FTPUSER:${FTPPASSWD}}" | chpasswd
pure-ftpd -p 21000:21000 -P 127.0.0.1

View File

@ -8,7 +8,6 @@ RUN apk add mariadb
RUN apk add mariadb-client
COPY srcs/start.sh /root/start.sh
COPY srcs/my.cnf /etc/my.cnf.d/mariadb-server.cnf
COPY srcs/wordpress.sql /root/wordpress.sql
WORKDIR /root/
RUN mkdir -p /run/mysqld
RUN chown -R mysql:mysql /run/mysqld /var/lib/mysql