You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.3 KiB
55 lines
1.3 KiB
3 years ago
|
FROM php:7.4-fpm-bullseye
|
||
|
|
||
|
ENV TZ="Asia/Jakarta"
|
||
|
RUN date
|
||
|
|
||
|
RUN apt-get update
|
||
|
RUN apt-get -y upgrade
|
||
|
RUN apt-get -y install \
|
||
|
apt-utils \
|
||
|
ca-certificates \
|
||
|
zip \
|
||
|
unzip \
|
||
|
libpq-dev \
|
||
|
libonig-dev \
|
||
|
libzip-dev \
|
||
|
libicu-dev
|
||
|
RUN docker-php-ext-install \
|
||
|
pgsql pdo_pgsql iconv intl mbstring zip
|
||
|
|
||
|
RUN apt-get clean
|
||
|
|
||
|
#RUN curl -sS https://getcomposer.org/installer | php -- \
|
||
|
# --install-dir=/usr/bin --filename=composer
|
||
|
|
||
|
ADD https://getcomposer.org/installer ./composer-setup.php
|
||
|
RUN php ./composer-setup.php --install-dir=/usr/local/bin --filename=composer
|
||
|
RUN rm ./composer-setup.php
|
||
|
|
||
|
COPY --from=ochinchina/supervisord:latest /usr/local/bin/supervisord /usr/local/bin/supervisord
|
||
|
COPY . /kit-api
|
||
|
|
||
|
RUN cd "/kit-api" && mv .env.production .env
|
||
|
|
||
|
# Create assets directory inside volume
|
||
|
RUN mkdir -p /ospro/assets/image
|
||
|
RUN mkdir -p /ospro/assets/file/project
|
||
|
RUN mkdir -p /ospro/assets/file/activity
|
||
|
|
||
|
# Install dependency
|
||
|
WORKDIR /kit-api
|
||
|
RUN composer update
|
||
|
RUN composer install
|
||
|
|
||
|
# copy configuration
|
||
|
RUN cp ./docker/supervisord.conf /etc/
|
||
|
RUN chmod +x ./docker/deps/shiftapp
|
||
|
RUN cp ./docker/deps/shiftapp /usr/local/bin/
|
||
|
|
||
|
EXPOSE 80
|
||
|
EXPOSE 8090
|
||
|
|
||
|
# CMD php -S 0.0.0.0:80
|
||
|
CMD ["/usr/local/bin/supervisord"]
|
||
|
|