at the end of the day, it was inevitable
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
CREATE DATABASE IF NOT EXISTS socialhose DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
CREATE DATABASE IF NOT EXISTS socialhose_test DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
@@ -0,0 +1,30 @@
|
||||
FROM webdevops/php-apache:7.4
|
||||
|
||||
WORKDIR "/var/www/html"
|
||||
RUN apt update -y & apt -y dist-upgrade
|
||||
RUN apt -y -f install apt-transport-https bash vim
|
||||
RUN curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | /bin/bash
|
||||
RUN apt -y install default-mysql-client mc acl sudo git nodejs npm cron python-pip
|
||||
|
||||
RUN docker-php-ext-install bcmath
|
||||
|
||||
# Create user
|
||||
ARG UID
|
||||
ENV USER application
|
||||
#RUN adduser -q --disabled-password --gecos "" $USER --uid $UID
|
||||
RUN usermod -aG sudo $USER
|
||||
RUN sed -i 's/%sudo\tALL=(ALL:ALL) ALL/%sudo ALL=(ALL:ALL) NOPASSWD:ALL/g' /etc/sudoers
|
||||
|
||||
|
||||
|
||||
# Add cron
|
||||
COPY crontab /etc/cron.d/crontab
|
||||
RUN sed -i 's/{{CWD}}/\/usr\/local\/bin\/php \/var\/www\/html\/bin\/console --env=stage/' /etc/cron.d/crontab
|
||||
RUN chmod 0644 /etc/cron.d/crontab
|
||||
RUN crontab /etc/cron.d/crontab
|
||||
RUN touch /var/log/cron.log
|
||||
|
||||
# Add supervisor
|
||||
RUN pip install supervisor
|
||||
RUN rmdir /app && ln -s /var/www/html/web /app
|
||||
USER application
|
||||
@@ -0,0 +1,6 @@
|
||||
CMD=/bin/console --env=stage
|
||||
|
||||
* * * * * {{CWD}} socialhose:notification:start 2>&1 > /dev/null
|
||||
0 0 * * * {{CWD}} socialhose:renew-search-limits 2>&1 > /dev/null
|
||||
*/30 * * * * {{CWD}} socialhose:stored-query:update 2>&1 > /dev/null
|
||||
* */3 * * * {{CWD}} socialhose:query:remove_old 2>&1 > /dev/null
|
||||
@@ -0,0 +1,27 @@
|
||||
FROM rabbitmq:3.8-alpine
|
||||
|
||||
RUN rabbitmq-plugins enable --offline rabbitmq_management
|
||||
|
||||
# extract "rabbitmqadmin" from inside the "rabbitmq_management-X.Y.Z.ez" plugin zipfile
|
||||
# see https://github.com/docker-library/rabbitmq/issues/207
|
||||
RUN set -eux; \
|
||||
erl -noinput -eval ' \
|
||||
{ ok, AdminBin } = zip:foldl(fun(FileInArchive, GetInfo, GetBin, Acc) -> \
|
||||
case Acc of \
|
||||
"" -> \
|
||||
case lists:suffix("/rabbitmqadmin", FileInArchive) of \
|
||||
true -> GetBin(); \
|
||||
false -> Acc \
|
||||
end; \
|
||||
_ -> Acc \
|
||||
end \
|
||||
end, "", init:get_plain_arguments()), \
|
||||
io:format("~s", [ AdminBin ]), \
|
||||
init:stop(). \
|
||||
' -- /plugins/rabbitmq_management-*.ez > /usr/local/bin/rabbitmqadmin; \
|
||||
[ -s /usr/local/bin/rabbitmqadmin ]; \
|
||||
chmod +x /usr/local/bin/rabbitmqadmin; \
|
||||
apk add --no-cache python3; \
|
||||
rabbitmqadmin --version
|
||||
|
||||
EXPOSE 15671 15672
|
||||
Reference in New Issue
Block a user