Skip to content

Commit 7f61b31

Browse files
committed
add loops
1 parent 069eb71 commit 7f61b31

4 files changed

Lines changed: 732 additions & 0 deletions

File tree

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
[submodule "appviewlite/AppViewLite"]
1111
path = appviewlite/AppViewLite
1212
url = https://github.com/alnkesq/AppViewLite.git
13+
[submodule "loops/loops-server"]
14+
path = loops/loops-server
15+
url = https://github.com/joinloops/loops-server.git

loops/Dockerfile

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Node.js stage for building assets
2+
FROM node:24-trixie-slim AS node
3+
# PHP base image
4+
FROM serversideup/php:8.4-fpm-nginx
5+
6+
# Set working directory
7+
WORKDIR /var/www/html
8+
9+
# Switch to root to install packages
10+
USER root
11+
12+
# Install system dependencies and PHP extensions
13+
RUN apt-get update && apt-get install -y \
14+
ffmpeg \
15+
libvips42 \
16+
unzip \
17+
zip \
18+
git \
19+
curl \
20+
&& rm -rf /var/lib/apt/lists/*
21+
22+
# Install PHP extensions using the built-in helper
23+
RUN install-php-extensions \
24+
bcmath \
25+
ctype \
26+
curl \
27+
fileinfo \
28+
gd \
29+
imagick \
30+
intl \
31+
json \
32+
mbstring \
33+
openssl \
34+
pdo_mysql \
35+
redis \
36+
tokenizer \
37+
vips \
38+
ffi \
39+
xml \
40+
zip
41+
42+
# Copy application files
43+
COPY --chown=www-data:www-data ./loops-server /var/www/html
44+
45+
# Set proper permissions
46+
RUN chown -R www-data:www-data /var/www/html \
47+
&& find /var/www/html -type f -exec chmod 644 {} \; \
48+
&& find /var/www/html -type d -exec chmod 755 {} \; \
49+
&& chmod -R ug+rwx /var/www/html/storage /var/www/html/bootstrap/cache
50+
51+
# Install composer dependencies
52+
RUN composer install --no-ansi --no-interaction --optimize-autoloader
53+
54+
# Copy Node.js binaries/libraries from node stage
55+
COPY --from=node /usr/local/bin /usr/local/bin
56+
COPY --from=node /usr/local/lib /usr/local/lib
57+
58+
# Install npm dependencies and build assets
59+
ENV NODE_ENV="production"
60+
RUN npm install
61+
RUN npm run build
62+
63+
# Switch back to www-data user
64+
USER www-data
65+
66+
# Expose port 8080 (default for serversideup/php)
67+
EXPOSE 8080

0 commit comments

Comments
 (0)