| ARG RELEASE |
| ARG LAUNCHPAD_BUILD_ARCH |
| LABEL org.opencontainers.image.version=24.04 |
| ADD file:54dafd97985c3ec227e2c96be9290657cf2ab456885b5fc8a24c9278bca65e60 in / |
| CMD ["/bin/bash"] |
| ENV DEBIAN_FRONTEND=noninteractive |
| ENV TZ=Asia/Jakarta |
| RUN /bin/sh -c apt-get update && apt-get install -y --no-install-recommends iputils-ping curl wget gnupg2 ca-certificates lsb-release apt-transport-https unzip git nginx sshpass supervisor wireguard cron && curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb && dpkg -i /tmp/debsuryorg-archive-keyring.deb && sh -c 'echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' && apt-get update # buildkit |
| RUN /bin/sh -c apt-get install -y --no-install-recommends php8.4-fpm php8.4-cli php8.4-common php8.4-mysql php8.4-pgsql php8.4-sqlite3 php8.4-mbstring php8.4-xml php8.4-bcmath php8.4-curl php8.4-zip php8.4-tokenizer php8.4-gd php8.4-redis && apt-get clean && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN /bin/sh -c mkdir -p /run/php && chown -R www-data:www-data /run/php # buildkit |
| COPY /usr/bin/composer /usr/bin/composer # buildkit |
| RUN /bin/sh -c sed -i 's/;clear_env = no/clear_env = no/' /etc/php/8.4/fpm/pool.d/www.conf # buildkit |
| RUN /bin/sh -c rm -f /etc/nginx/sites-enabled/default # buildkit |
| COPY conf/nginx/nginx.conf /etc/nginx/sites-enabled/default # buildkit |
| COPY conf/supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # buildkit |
| COPY wg-up.sh /usr/local/bin/wg-up.sh # buildkit |
| RUN /bin/sh -c chmod +x /usr/local/bin/wg-up.sh # buildkit |
| COPY conf/wireguard etc/wireguard # buildkit |
| COPY conf/cron/main etc/cron.d/main # buildkit |
| RUN /bin/sh -c chmod 0644 /etc/cron.d/main # buildkit |
| COPY healthcheck.sh /usr/local/bin/healthcheck.sh # buildkit |
| RUN /bin/sh -c chmod +x /usr/local/bin/healthcheck.sh # buildkit |
| WORKDIR /var/www |
| COPY bknala/cdn ./cdn # buildkit |
| COPY bknala/billing ./billing # buildkit |
| RUN /bin/sh -c rm -rf ./cdn/.git # buildkit |
| RUN /bin/sh -c rm -rf ./billing/.git # buildkit |
| RUN /bin/sh -c rm -rf ./billing/.env # buildkit |
| RUN /bin/sh -c rm -rf ./billing/.env.bk # buildkit |
| WORKDIR /var/www/billing |
| RUN /bin/sh -c chown -R www-data:www-data . && chmod -R 775 storage # buildkit |
| EXPOSE 80/tcp |
| HEALTHCHECK {Test:[CMD /usr/local/bin/healthcheck.sh] Interval:30s Timeout:10s StartPeriod:30s StartInterval:0s Retries:3} |
| ENTRYPOINT [] |
| CMD ["sh" "-c" "printenv > /etc/environment && /usr/bin/supervisord" "-c" "/etc/supervisor/supervisord.conf"] |