Skip to content
Snippets Groups Projects
Verified Commit f3e4d24d authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

feat: update Docker configuration and GitLab CI

- Updated `docker-compose.yml` to set the image name and define the command for the application.
- Enhanced `Dockerfile` by adding Composer installation, SSH client for GitLab CI, and modifying the entrypoint and default command for local development.
- Improved `.gitlab-ci.yml` by adjusting the Composer install command to use `--prefer-dist --no-interaction`.
parent 0935e508
No related branches found
No related tags found
1 merge request!52Ajout de Laravel Octane
Pipeline #958 failed
......@@ -13,14 +13,12 @@ unit_test:
stage: test
before_script:
- cd '/builds/SofianeLasri/rann-graphic-design-website'
- sed -i 's@/var/www@/builds/SofianeLasri/rann-graphic-design-website@g' /etc/apache2/sites-available/000-default.conf
- service apache2 start
- npm config set @awesome.me:registry https://npm.fontawesome.com/
- npm config set @fortawesome:registry https://npm.fontawesome.com/
- npm config set //npm.fontawesome.com/:_authToken $FONT_AWESOME_TOKEN
script:
- cp .env.testing .env
- composer install
- composer install --prefer-dist --no-interaction
- php artisan key:generate
- php artisan migrate
- npm install
......
......@@ -12,15 +12,24 @@ RUN install-php-extensions \
pcntl \
bcmath
# Install Composer
RUN curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install Laravel Envoy
RUN composer global require "laravel/envoy"
# Install Nodejs and NPM
RUN curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh
RUN bash nodesource_setup.sh
RUN curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh && \
bash nodesource_setup.sh && \
apt-get install -y nodejs
RUN apt-get install -y nodejs
# Install SSH client for GitLab CI
RUN apt-get update && apt-get install -y --no-install-recommends openssh-client
COPY . /app
ENTRYPOINT ["php", "artisan", "octane:frankenphp"]
\ No newline at end of file
# Needed for GitLab CI
ENTRYPOINT [ "/bin/sh", "-c" ]
# Default command for local development
CMD [ "php artisan octane:frankenphp --workers=1 --max-requests=1" ]
......@@ -2,7 +2,8 @@ services:
app:
build:
context: .
entrypoint: php artisan octane:frankenphp --workers=1 --max-requests=1
image: registry.gitlab.sl-projects.com/sofianelasri/rann-graphic-design-website:latest
command: php artisan octane:frankenphp --workers=1 --max-requests=1
ports:
- '80:8000'
- '5173:5173'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment