Skip to content

Commit

Permalink
adjust entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
alihm committed Jan 13, 2025
1 parent 48487e7 commit dc0b7cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ RUN chmod +x /usr/local/php-fpm.sh
EXPOSE 80
# Expose the SFTP server port
EXPOSE 2222/tcp

ENTRYPOINT ["/usr/local/docker-entrypoint.sh"]
# Start PHP-FPM and Nginx servers
CMD /usr/local/php-fpm.sh & nginx -g "daemon off;" -c "/var/www/html/nginx.conf" & /usr/sbin/sshd -D & redis-server
ENTRYPOINT ["/usr/local/docker-entrypoint.sh"]
CMD []]
7 changes: 7 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ else
echo "PUBLIC_KEY is not defined."
fi

# Start background processes
/usr/local/php-fpm.sh &
nginx -g "daemon off;" -c "/var/www/html/nginx.conf" &
/usr/sbin/sshd -D &
redis-server &

# Execute the command passed to the container
exec "$@"

## echo "127.0.0.1 $(hostname) localhost localhost.localdomain" >> /etc/hosts;
Expand Down

0 comments on commit dc0b7cb

Please sign in to comment.