enable passive mode for vsftpd and use secret for user password
This commit is contained in:
parent
eefd5d8254
commit
979b9b0a6e
5 changed files with 19 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
DOMAIN_NAME=alier.42.fr
|
DOMAIN_NAME=alier.42.fr
|
||||||
TITLE=42 News
|
TITLE=42 News
|
||||||
ADMIN_EMAIL=alier@student.42mulhouse.fr
|
ADMIN_EMAIL=alier@student.42mulhouse.fr
|
||||||
ADMIN_USER=arnaudlier
|
ADMIN_USER=alier
|
||||||
DATA_PATH=/Users/arnaudlier/data
|
DATA_PATH=/Users/arnaudlier/data
|
||||||
DB_USER=wordpress
|
DB_USER=wordpress
|
||||||
DB_DB=wordpress
|
DB_DB=wordpress
|
|
@ -79,6 +79,10 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 21:21
|
- 21:21
|
||||||
- 20:20
|
- 20:20
|
||||||
|
- 21100-21110:21100-21110
|
||||||
|
secrets:
|
||||||
|
- admin_password
|
||||||
|
env_file: .env
|
||||||
adminer:
|
adminer:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
|
@ -4,13 +4,12 @@ LABEL org.opencontainers.image.authors="alier@student.42mulhouse.fr"
|
||||||
|
|
||||||
RUN apk add vsftpd
|
RUN apk add vsftpd
|
||||||
|
|
||||||
RUN printf 'Born2beroot\nBorn2beroot' | adduser arnaud -h /var/www/wordpress
|
|
||||||
|
|
||||||
#HEALTHCHECK --start-period=5s \
|
#HEALTHCHECK --start-period=5s \
|
||||||
# CMD cgi-fcgi -bind -connect 127.0.0.1:9001 || exit 1
|
# CMD cgi-fcgi -bind -connect 127.0.0.1:9001 || exit 1
|
||||||
|
|
||||||
COPY conf/vsftpd.conf /etc/vsftpd/vsftpd.conf
|
COPY conf/vsftpd.conf /etc/vsftpd/vsftpd.conf
|
||||||
|
COPY tools/setup_vsftpd.sh /setup_vsftpd.sh
|
||||||
|
|
||||||
EXPOSE 21
|
EXPOSE 21
|
||||||
|
|
||||||
ENTRYPOINT ["vsftpd", "/etc/vsftpd/vsftpd.conf"]
|
ENTRYPOINT ["sh", "setup_vsftpd.sh"]
|
||||||
|
|
|
@ -117,4 +117,7 @@ listen=YES
|
||||||
# Make sure, that one of the listen options is commented !!
|
# Make sure, that one of the listen options is commented !!
|
||||||
#listen_ipv6=YES
|
#listen_ipv6=YES
|
||||||
|
|
||||||
pasv_enable=NO
|
pasv_enable=YES
|
||||||
|
pasv_address=127.0.0.1
|
||||||
|
pasv_min_port=21100
|
||||||
|
pasv_max_port=21110
|
||||||
|
|
7
srcs/requirements/bonus/vsftpd/tools/setup_vsftpd.sh
Normal file
7
srcs/requirements/bonus/vsftpd/tools/setup_vsftpd.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PASSWORD="$(cat /run/secrets/admin_password)"
|
||||||
|
|
||||||
|
printf "$PASSWORD\n$PASSWORD" | adduser "$ADMIN_USER" -h /var/www/wordpress
|
||||||
|
|
||||||
|
exec vsftpd /etc/vsftpd/vsftpd.conf
|
Loading…
Add table
Reference in a new issue