Skip to content

Commit

Permalink
Adjust docker file to handle composer and npm installs as well as the…
Browse files Browse the repository at this point in the history
… vite build pipeline
  • Loading branch information
MuchQuak committed Dec 19, 2024
1 parent 4022ccd commit 6c74daf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
services:
web:
build:
context: './docker/8.3'
dockerfile: Dockerfile
dockerfile: './docker/8.3/Dockerfile'
args:
WWWGROUP: '${WWWGROUP}'
MYSQL_CLIENT: mariadb-client
Expand Down
19 changes: 9 additions & 10 deletions docker/8.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,10 @@ RUN apt-get update \
&& apt-get update \
&& apt-get install -y nodejs \
&& npm install -g npm \
#&& npm install -g pnpm \
#&& npm install -g bun \
&& npx -y playwright@latest install --with-deps \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/keyrings/yarn.gpg >/dev/null \
&& echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/keyrings/pgdg.gpg >/dev/null \
&& echo "deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& apt-get update \
&& apt-get install -y yarn \
&& apt-get install -y $MYSQL_CLIENT \
&& apt-get install -y postgresql-client-$POSTGRES_VERSION \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Expand All @@ -59,11 +52,17 @@ RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.3
RUN groupadd --force -g $WWWGROUP sail
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail

COPY start-container /usr/local/bin/start-container
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY php.ini /etc/php/8.3/cli/conf.d/99-sail.ini
COPY ./docker/8.3/start-container /usr/local/bin/start-container
COPY ./docker/8.3/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY ./docker/8.3/php.ini /etc/php/8.3/cli/conf.d/99-sail.ini
RUN chmod +x /usr/local/bin/start-container

COPY ./ .

RUN composer install --ignore-platform-reqs --no-scripts

RUN npm install && npm run build

EXPOSE 80/tcp

ENTRYPOINT ["start-container"]

0 comments on commit 6c74daf

Please sign in to comment.