Skip to content

Commit

Permalink
moved build stage into pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanni8 committed Feb 14, 2024
1 parent bb0ca94 commit 44ac732
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,4 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
run: |
sudo apt update && sudo apt install composer
composer install
npm i
npm run build
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/bbzblit/m306/app:latest --push .
14 changes: 10 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
FROM php:8.2
FROM debian:bookworm-slim as build-ui

WORKDIR /var/www/html
WORKDIR /data

COPY . .

RUN apt update && apt upgrade -y && apt install -y zip unzip
RUN apt update && apt install -y nodejs npm composer php-dom php-xml php-curl && php --ini && composer install && npm i && npm run build

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
FROM composer:2.7

WORKDIR /var/www/html

COPY . .

COPY --from=build-ui /data/public/build ./public/build

RUN composer install

ENTRYPOINT ["php","artisan","serve","--host=0.0.0.0"]

0 comments on commit 44ac732

Please sign in to comment.