-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #314 from Steinbeck-Lab/development
Development
- Loading branch information
Showing
288 changed files
with
8,006 additions
and
31,597 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/.phpunit.cache | ||
/node_modules | ||
/public/build | ||
/public/hot | ||
/public/storage | ||
/storage/*.key | ||
/storage/app/public | ||
/storage/debugbar | ||
/storage/ssr | ||
/storage/clockwork | ||
/storage/logs | ||
/storage/pail | ||
.phpunit.result.cache | ||
Homestead.json | ||
Homestead.yaml | ||
npm-debug.log | ||
yarn-error.log | ||
/vendor | ||
.env.backup | ||
/.idea/sonarlint | ||
.phpstorm.meta.php | ||
_ide_helper_models.php | ||
_ide_helper.php | ||
.php-cs-fixer.cache | ||
.husky | ||
/.vscode | ||
**/.DS_Store | ||
/public/page-cache | ||
.phpunit.database.checksum | ||
.phpunit.cache | ||
rr | ||
.rr.yaml | ||
frankenphp | ||
.config | ||
.data | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
# This worklflow will perform following actions when the code is pushed to development branch: | ||
# - Build the latest docker image in development. | ||
# - Push the latest docker image to Google Artifact Registry-Dev. | ||
# - Rollout the latest image in GKE. | ||
# | ||
# Maintainers: | ||
# - name: Chandu Nainala | ||
# - email: [email protected] | ||
|
||
name : Build COCONUT image | ||
|
||
on: | ||
push: | ||
branches: [development] | ||
|
||
env: | ||
PROJECT_ID: ${{ secrets.GKE_PROJECT }} | ||
REPOSITORY_NAME: coconut | ||
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
APP_IMAGE: coconut-app | ||
REPOSITORY_NAMESPACE: nfdi4chem | ||
|
||
jobs: | ||
setup-build-publish-deploy-dev: | ||
name: Build & deploy to development | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: Dev | ||
steps: | ||
# Checkout code | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Login to Docker | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ env.DOCKER_HUB_USERNAME }} | ||
password: ${{ env.DOCKER_HUB_PASSWORD }} | ||
|
||
# Build and push the app Docker image | ||
- name: Build and push App Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./FrankenPHP.Dockerfile | ||
push: true | ||
build-args: | | ||
RELEASE_VERSION=latest | ||
COMPOSER_AUTH=${{ secrets.COMPOSER_AUTH }} | ||
tags: ${{ env.REPOSITORY_NAMESPACE }}/${{ env.REPOSITORY_NAME }}:latest |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
ARG PHP_VERSION=8.3 | ||
|
||
ARG FRANKENPHP_VERSION=latest | ||
|
||
ARG COMPOSER_VERSION=latest | ||
|
||
ARG NODE_VERSION="18" | ||
|
||
FROM composer:${COMPOSER_VERSION} AS vendor | ||
|
||
FROM dunglas/frankenphp:${FRANKENPHP_VERSION}-php${PHP_VERSION} AS final | ||
|
||
LABEL maintainer="SMortexa <[email protected]>" | ||
LABEL org.opencontainers.image.title="Laravel Octane Dockerfile" | ||
LABEL org.opencontainers.image.description="Production-ready Dockerfile for Laravel Octane" | ||
LABEL org.opencontainers.image.source=https://github.com/exaco/laravel-octane-dockerfile | ||
LABEL org.opencontainers.image.licenses=MIT | ||
|
||
ARG WWWUSER=1000 | ||
ARG WWWGROUP=1000 | ||
ARG TZ=UTC | ||
ARG APP_DIR=/var/www/html | ||
ARG COMPOSER_AUTH | ||
|
||
ENV COMPOSER_AUTH=$COMPOSER_AUTH | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
TERM=xterm-color \ | ||
WITH_HORIZON=false \ | ||
WITH_SCHEDULER=false \ | ||
OCTANE_SERVER=frankenphp \ | ||
USER=octane \ | ||
ROOT=${APP_DIR} \ | ||
COMPOSER_FUND=0 \ | ||
COMPOSER_MAX_PARALLEL_HTTP=24 \ | ||
XDG_CONFIG_HOME=${APP_DIR}/.config \ | ||
XDG_DATA_HOME=${APP_DIR}/.data | ||
|
||
WORKDIR ${ROOT} | ||
|
||
SHELL ["/bin/bash", "-eou", "pipefail", "-c"] | ||
|
||
RUN ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime \ | ||
&& echo ${TZ} > /etc/timezone | ||
|
||
RUN apt-get update; \ | ||
apt-get upgrade -yqq; \ | ||
apt-get install -yqq --no-install-recommends --show-progress \ | ||
apt-utils \ | ||
curl \ | ||
wget \ | ||
vim \ | ||
git \ | ||
ncdu \ | ||
procps \ | ||
ca-certificates \ | ||
supervisor \ | ||
libsodium-dev \ | ||
# Install PHP extensions (included with dunglas/frankenphp) | ||
&& install-php-extensions \ | ||
bz2 \ | ||
pcntl \ | ||
mbstring \ | ||
bcmath \ | ||
sockets \ | ||
pgsql \ | ||
pdo_pgsql \ | ||
opcache \ | ||
exif \ | ||
pdo_mysql \ | ||
zip \ | ||
intl \ | ||
gd \ | ||
redis \ | ||
rdkafka \ | ||
memcached \ | ||
igbinary \ | ||
ldap \ | ||
&& apt-get -y autoremove \ | ||
&& apt-get clean \ | ||
&& docker-php-source delete \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ | ||
&& rm /var/log/lastlog /var/log/faillog | ||
|
||
RUN arch="$(uname -m)" \ | ||
&& case "$arch" in \ | ||
armhf) _cronic_fname='supercronic-linux-arm' ;; \ | ||
aarch64) _cronic_fname='supercronic-linux-arm64' ;; \ | ||
x86_64) _cronic_fname='supercronic-linux-amd64' ;; \ | ||
x86) _cronic_fname='supercronic-linux-386' ;; \ | ||
*) echo >&2 "error: unsupported architecture: $arch"; exit 1 ;; \ | ||
esac \ | ||
&& wget -q "https://github.com/aptible/supercronic/releases/download/v0.2.29/${_cronic_fname}" \ | ||
-O /usr/bin/supercronic \ | ||
&& chmod +x /usr/bin/supercronic \ | ||
&& mkdir -p /etc/supercronic \ | ||
&& echo "*/1 * * * * php ${ROOT}/artisan schedule:run --no-interaction" > /etc/supercronic/laravel | ||
|
||
RUN userdel --remove --force www-data \ | ||
&& groupadd --force -g ${WWWGROUP} ${USER} \ | ||
&& useradd -ms /bin/bash --no-log-init --no-user-group -g ${WWWGROUP} -u ${WWWUSER} ${USER} | ||
|
||
RUN chown -R ${USER}:${USER} ${ROOT} /var/{log,run} \ | ||
&& chmod -R a+rw ${ROOT} /var/{log,run} | ||
|
||
RUN cp ${PHP_INI_DIR}/php.ini-production ${PHP_INI_DIR}/php.ini | ||
|
||
USER ${USER} | ||
|
||
# uncomment when built manually otherwise provided via composer auth | ||
# COPY --link --chown=${WWWUSER}:${WWWUSER} auth.json ./ | ||
COPY --link --chown=${WWWUSER}:${WWWUSER} --from=vendor /usr/bin/composer /usr/bin/composer | ||
COPY --link --chown=${WWWUSER}:${WWWUSER} composer.json composer.lock ./ | ||
|
||
RUN COMPOSER_AUTH="$COMPOSER_AUTH" composer install \ | ||
--no-dev \ | ||
--no-interaction \ | ||
--no-autoloader \ | ||
--no-ansi \ | ||
--no-scripts \ | ||
--audit | ||
|
||
COPY --link --chown=${WWWUSER}:${WWWUSER} . . | ||
|
||
########################################### | ||
# Build frontend assets with NPM | ||
########################################### | ||
|
||
FROM node:${NODE_VERSION} AS build | ||
|
||
ENV ROOT=/var/www/html | ||
|
||
WORKDIR ${ROOT} | ||
|
||
COPY --link package.json package-lock.json ./ | ||
|
||
RUN npm ci | ||
|
||
COPY --link --from=final ${ROOT}/vendor vendor | ||
COPY --link . . | ||
|
||
RUN npm run build | ||
|
||
########################################### | ||
|
||
FROM final | ||
|
||
WORKDIR ${ROOT} | ||
|
||
COPY --link --chown=${WWWUSER}:${WWWUSER} --from=build ${ROOT}/public public | ||
|
||
RUN mkdir -p \ | ||
storage/framework/{sessions,views,cache,testing} \ | ||
storage/logs \ | ||
bootstrap/cache && chmod -R a+rw storage | ||
|
||
COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/supervisor/ | ||
COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/octane/FrankenPHP/supervisord.frankenphp.conf /etc/supervisor/conf.d/ | ||
COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.*.conf /etc/supervisor/conf.d/ | ||
COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/start-container /usr/local/bin/start-container | ||
COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/healthcheck /usr/local/bin/healthcheck | ||
COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/php.ini ${PHP_INI_DIR}/conf.d/99-octane.ini | ||
|
||
# FrankenPHP embedded PHP configuration | ||
COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/php.ini /lib/php.ini | ||
|
||
RUN composer install \ | ||
--classmap-authoritative \ | ||
--no-interaction \ | ||
--no-ansi \ | ||
--no-dev \ | ||
&& composer clear-cache | ||
|
||
RUN chmod +x /usr/local/bin/start-container /usr/local/bin/healthcheck | ||
|
||
RUN cat deployment/utilities.sh >> ~/.bashrc | ||
|
||
EXPOSE 8000 | ||
EXPOSE 443 | ||
EXPOSE 443/udp | ||
EXPOSE 2019 | ||
|
||
ENTRYPOINT ["start-container"] | ||
|
||
HEALTHCHECK --start-period=5s --interval=2s --timeout=5s --retries=8 CMD healthcheck || exit 1 |
Oops, something went wrong.