+ supervisor, python and uvicorn in workspace74 (partially commit - no fully worked solution)
This commit is contained in:
@ -71,17 +71,72 @@ RUN composer self-update # Need for correctly update to actual old branch
|
||||
RUN composer self-update --${COMPOSER_VERSION}
|
||||
|
||||
###########################################################################
|
||||
# Laradock Aliases
|
||||
# YADM
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
# once please
|
||||
RUN apt update
|
||||
|
||||
RUN apt install -y direnv yadm
|
||||
RUN curl -sS https://starship.rs/install.sh | sh -s -- -f
|
||||
|
||||
USER laradock
|
||||
|
||||
COPY ./aliases.sh /home/laradock/aliases.sh
|
||||
RUN yadm clone --bootstrap https://vcs.wpstudio.ru/gitea/dotfiles.git
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||
echo "" >> ~/.bashrc
|
||||
RUN sed -i 's/#/\\$/g' ${HOME}/.config/starship.toml
|
||||
|
||||
###########################################################################
|
||||
# SUPERVISOR:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_SUPERVISOR=false
|
||||
|
||||
RUN if [ ${INSTALL_SUPERVISOR} = true ]; then \
|
||||
apt install -y supervisor \
|
||||
;fi
|
||||
|
||||
RUN apt install -y liblzma-dev libbz2-dev libffi-dev libreadline-dev
|
||||
|
||||
USER laradock
|
||||
|
||||
RUN curl https://pyenv.run | bash
|
||||
|
||||
RUN echo '' >> ~/.shell-env.local && \
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.shell-env.local && \
|
||||
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.shell-env.local && \
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.shell-env.local && \
|
||||
echo '' >> ~/.shell-env.local && \
|
||||
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.shell-env.local && \
|
||||
echo '' >> ~/.shell-env.local
|
||||
|
||||
RUN $HOME/.pyenv/bin/pyenv install 3.9
|
||||
|
||||
ARG INSTALL_PYTHON=false
|
||||
|
||||
RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||
export PYENV_VERSION=3.9 && \
|
||||
python -m pip install uvicorn \
|
||||
;fi
|
||||
|
||||
RUN if [ false = true ]; then \
|
||||
export PYENV_VERSION=3.9 && \
|
||||
python -m pip install uvicorn && \
|
||||
python -m pip install --upgrade supervisor && \
|
||||
echo_supervisord_conf > /etc/supervisord.conf && \
|
||||
sed -i 's/\;\[include\]/\[include\]/g' /etc/supervisord.conf && \
|
||||
sed -i 's/\;files\s.*/files = supervisord.d\/*.conf/g' /etc/supervisord.conf \
|
||||
;fi
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt install -y htop
|
||||
|
||||
###########################################################################
|
||||
# Tune opts:
|
||||
@ -104,6 +159,13 @@ RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" /etc/ph
|
||||
|
||||
USER root
|
||||
|
||||
# Clean up
|
||||
RUN apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
COPY ./crontab /etc/cron.d
|
||||
|
||||
RUN chmod -R 644 /etc/cron.d
|
||||
|
||||
|
||||
#ENTRYPOINT ["/bin/bash","-c","service supervisor start"]
|
Reference in New Issue
Block a user