Skip to content

Commit 2435fe0

Browse files
committed
Some fixes again
I'm not following git practices at all
1 parent 050fe54 commit 2435fe0

File tree

8 files changed

+267
-173
lines changed

8 files changed

+267
-173
lines changed

services/query-engine/.dockerignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ node_modules
44
vendor
55

66
# Laravel specific
7-
.env
8-
.env.* # ignore all environment files (optional, in case you pass them via Cloud Run env vars)
7+
# .env
8+
# .env.* # ignore all environment files (optional, in case you pass them via Cloud Run env vars)
99
storage/*.key
1010
storage/logs
1111
storage/framework/sessions/*

services/query-engine/Dockerfile

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ FROM php:8.3-fpm
33
ARG user=query-engine-user
44
ARG uid=1000
55

6-
# Install dependencies
76
RUN apt-get update && apt-get install -y \
87
git \
98
curl \
@@ -16,49 +15,36 @@ RUN apt-get update && apt-get install -y \
1615
libxml2-dev \
1716
libpng-dev \
1817
nodejs \
19-
npm \
20-
debian-keyring \
21-
debian-archive-keyring \
22-
apt-transport-https \
23-
gnupg
24-
25-
# Install Caddy
26-
RUN curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg \
27-
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list \
28-
&& apt-get update \
29-
&& apt-get install -y caddy
18+
npm
3019

3120
# Clear cache
3221
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
3322

34-
# Install PHP extensions
35-
RUN docker-php-ext-install mbstring xml pdo pdo_mysql
23+
# Install php extensions
24+
RUN docker-php-ext-install mbstring xml
3625

3726
# Install MongoDB extension
27+
# RUN pecl install mongodb && docker-php-ext-enable mongodb
28+
# Install MongoDB extension (version 1.x)
3829
RUN pecl install mongodb-1.21.0 && docker-php-ext-enable mongodb
3930

40-
# Install composer
31+
# install composer
4132
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
4233

43-
# Create system user
34+
# Install Redis extension
35+
RUN composer require predis/predis
36+
37+
# Create user
4438
RUN useradd -u $uid -ms /bin/bash -g www-data $user
4539

4640
# Copy application
4741
COPY . /var/www
48-
COPY --chown=$user:www-data . /var/www
4942

50-
# Create Caddyfile
51-
RUN echo "{\n\
52-
auto_https off\n\
53-
}\n\
54-
:8080 {\n\
55-
root * /var/www/public\n\
56-
php_fastcgi 127.0.0.1:9000\n\
57-
file_server\n\
58-
}" > /etc/caddy/Caddyfile
43+
COPY --chown=$user:www-data . /var/www
5944

6045
# Make sure entrypoint script is executable
6146
COPY docker-entrypoint.sh /usr/local/bin/
47+
6248
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
6349

6450
WORKDIR /var/www
@@ -69,6 +55,10 @@ RUN npm install && npm run build
6955
# Install PHP dependencies
7056
RUN composer install --no-dev --optimize-autoloader
7157

72-
EXPOSE 8080
58+
USER $user
59+
60+
EXPOSE 9000
7361

7462
ENTRYPOINT ["docker-entrypoint.sh"]
63+
64+
CMD ["php-fpm"]

0 commit comments

Comments
 (0)