mirror of
https://github.com/fleetbase/fleetbase.git
synced 2025-12-20 06:32:18 +00:00
Compare commits
2 Commits
dev-v0.6.0
...
feature/bi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff59941947 | ||
|
|
013e19f39e |
47
static-build.Dockerfile
Normal file
47
static-build.Dockerfile
Normal file
@@ -0,0 +1,47 @@
|
||||
FROM --platform=linux/amd64 dunglas/frankenphp:static-builder
|
||||
|
||||
# # Install packages
|
||||
# RUN apt-get update && apt-get install -y git bind9-utils mycli nodejs npm \
|
||||
# && mkdir -p /root/.ssh \
|
||||
# && ssh-keyscan github.com >> /root/.ssh/known_hosts
|
||||
|
||||
# Set some build ENV variables
|
||||
ENV LOG_CHANNEL=stdout
|
||||
ENV CACHE_DRIVER=null
|
||||
ENV BROADCAST_DRIVER=socketcluster
|
||||
ENV QUEUE_CONNECTION=redis
|
||||
ENV CADDYFILE_PATH=/fleetbase/Caddyfile
|
||||
ENV OCTANE_SERVER=frankenphp
|
||||
|
||||
# Set environment
|
||||
ARG ENVIRONMENT=production
|
||||
ENV APP_ENV=$ENVIRONMENT
|
||||
|
||||
# Copy Caddyfile
|
||||
COPY ./Caddyfile $CADDYFILE_PATH
|
||||
|
||||
# Create /fleetbase directory and set correct permissions
|
||||
RUN mkdir -p /fleetbase && mkdir -p /fleetbase/api && mkdir -p /fleetbase/console
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /fleetbase/api
|
||||
|
||||
# Setup api
|
||||
COPY ./api /fleetbase/api
|
||||
|
||||
# Setup console
|
||||
COPY ./console /fleetbase/console
|
||||
|
||||
# Set permissions for deploy script
|
||||
RUN chmod +x /fleetbase/api/deploy.sh
|
||||
|
||||
# Pre-install Composer dependencies
|
||||
# RUN /bin/sh -c "composer install --no-scripts --optimize-autoloader --no-dev"
|
||||
|
||||
# Dump autoload
|
||||
# RUN /bin/sh -c "composer dumpautoload"
|
||||
|
||||
# Build binary
|
||||
RUN EMBED=/ \
|
||||
PHP_EXTENSIONS=pdo_mysql,gd,bcmath,redis,intl,zip,gmp,apcu,opcache,memcached,imagick,geos,sockets,pcntl \
|
||||
./build-static.sh
|
||||
Reference in New Issue
Block a user