mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-01-06 06:15:51 +00:00
wip: binary build
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
FROM --platform=linux/amd64 dunglas/frankenphp:static-builder
|
FROM --platform=linux/amd64 dunglas/frankenphp:static-builder
|
||||||
|
|
||||||
# Install packages
|
# # Install packages
|
||||||
RUN apt-get update && apt-get install -y git bind9-utils mycli nodejs npm \
|
# RUN apt-get update && apt-get install -y git bind9-utils mycli nodejs npm \
|
||||||
&& mkdir -p /root/.ssh \
|
# && mkdir -p /root/.ssh \
|
||||||
&& ssh-keyscan github.com >> /root/.ssh/known_hosts
|
# && ssh-keyscan github.com >> /root/.ssh/known_hosts
|
||||||
|
|
||||||
# Set some build ENV variables
|
# Set some build ENV variables
|
||||||
ENV LOG_CHANNEL=stdout
|
ENV LOG_CHANNEL=stdout
|
||||||
@@ -18,28 +18,28 @@ ARG ENVIRONMENT=production
|
|||||||
ENV APP_ENV=$ENVIRONMENT
|
ENV APP_ENV=$ENVIRONMENT
|
||||||
|
|
||||||
# Copy Caddyfile
|
# Copy Caddyfile
|
||||||
COPY --chown=www-data:www-data ./Caddyfile $CADDYFILE_PATH
|
COPY ./Caddyfile $CADDYFILE_PATH
|
||||||
|
|
||||||
# Create /fleetbase directory and set correct permissions
|
# Create /fleetbase directory and set correct permissions
|
||||||
RUN mkdir -p /fleetbase/api && chown -R www-data:www-data /fleetbase
|
RUN mkdir -p /fleetbase && mkdir -p /fleetbase/api && mkdir -p /fleetbase/console
|
||||||
|
|
||||||
# Set working directory
|
# Set working directory
|
||||||
WORKDIR /fleetbase/api
|
WORKDIR /fleetbase/api
|
||||||
|
|
||||||
# Setup api
|
# Setup api
|
||||||
COPY --chown=www-data:www-data ./api /fleetbase/api
|
COPY ./api /fleetbase/api
|
||||||
|
|
||||||
# Setup console
|
# Setup console
|
||||||
COPY --chown=www-data:www-data ./console /fleetbase/console
|
COPY ./console /fleetbase/console
|
||||||
|
|
||||||
# Set permissions for deploy script
|
# Set permissions for deploy script
|
||||||
RUN chmod +x /fleetbase/api/deploy.sh
|
RUN chmod +x /fleetbase/api/deploy.sh
|
||||||
|
|
||||||
# Pre-install Composer dependencies
|
# Pre-install Composer dependencies
|
||||||
RUN su www-data -s /bin/sh -c "composer install --no-scripts --optimize-autoloader --no-dev"
|
# RUN /bin/sh -c "composer install --no-scripts --optimize-autoloader --no-dev"
|
||||||
|
|
||||||
# Dump autoload
|
# Dump autoload
|
||||||
RUN su www-data -s /bin/sh -c "composer dumpautoload"
|
# RUN /bin/sh -c "composer dumpautoload"
|
||||||
|
|
||||||
# Build binary
|
# Build binary
|
||||||
RUN EMBED=/ \
|
RUN EMBED=/ \
|
||||||
|
|||||||
Reference in New Issue
Block a user