Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for build problem #121

Merged
merged 2 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .do/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ RUN cp .env.example .env \
&& npm run build \
&& find . -path './vendor' -prune -o -path './node_modules' -prune -o -exec chown www-data:www-data {} +

# Remove the broad chown since we've already set permissions where needed
EXPOSE 8080/tcp

ENTRYPOINT ["start-container"]
15 changes: 10 additions & 5 deletions Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,21 @@ COPY ${DOCKERFILE_PATH}/php.ini /etc/php/${PHP_VERSION}/fpm/conf.d/99-php.ini
COPY ${DOCKERFILE_PATH}/php-fpm.conf /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf
RUN chmod +x /usr/local/bin/start-container

# Install dependencies normally first
RUN cp .env.example .env \
&& composer install \
&& touch database/database.sqlite \
&& npm install \
&& php artisan key:generate \
&& npm run build

# chown all files to www-data
RUN chown -R www-data:www-data /var/www/html

EXPOSE 8080/tcp
# Create directory and move dependencies
RUN mkdir -p /opt/loadpartner \
&& mv vendor /opt/loadpartner/ \
&& mv node_modules /opt/loadpartner/ \
&& rm -rf /var/www/html/* \
&& ln -s /opt/loadpartner/vendor vendor \
&& ln -s /opt/loadpartner/node_modules node_modules

ENTRYPOINT ["start-container"]
# chown all files to www-data
RUN chown -R www-data:www-data /var/www/html /opt/loadpartner