o.moresis
7 months ago
14 changed files with 228 additions and 50 deletions
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
FROM caddy:latest |
||||
|
||||
# Ensure the www-data user and group match the host system |
||||
# RUN groupadd -g 1000 www-data && useradd -u 1000 -g www-data -s /bin/bash www-data |
||||
|
||||
# Set permissions for /var/www/html |
||||
# RUN chown -R www-data:www-data /var/www/html |
||||
|
@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
|
||||
localhost { |
||||
root * /var/www/html/public |
||||
file_server |
||||
php_fastcgi php_backend:9000 |
||||
|
||||
log { |
||||
output file /var/log/caddy.log |
||||
} |
||||
} |
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
FROM php:8.2-fpm-alpine |
||||
|
||||
# Install system dependencies and PostgreSQL libraries |
||||
RUN apk add --no-cache \ |
||||
libpng-dev \ |
||||
libjpeg-turbo-dev \ |
||||
freetype-dev \ |
||||
postgresql-dev \ |
||||
libpq \ |
||||
unzip \ |
||||
git |
||||
|
||||
# Configure and install PHP extensions |
||||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \ |
||||
&& docker-php-ext-install -j$(nproc) gd pdo pdo_pgsql pgsql |
||||
|
||||
ENV REPO_URL= |
||||
ENV GEOSERVER_URL= |
||||
ENV GEOSERVER_USERNAME= |
||||
ENV GEOSERVER_PASSWORD= |
||||
ENV GEONETWORK_URL= |
||||
ENV GEONETWORK_API_KEY= |
||||
ENV GEONETWORK_API_VERSION= |
||||
ENV PG_USER= |
||||
ENV PG_PASS= |
||||
ENV PG_NAME= |
||||
ENV PG_HOST= |
||||
|
||||
# Install Composer |
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer |
||||
|
||||
# Ensure the www-data user and group match the host system |
||||
# RUN addgroup -g 1000 www-data && adduser -u 1000 -G www-data -s /bin/sh -D www-data |
||||
# RUN addgroup -g 1000 nobody && adduser -u 1000 -G nobody -s /bin/sh -D nobody |
||||
|
||||
# Set permissions for /var/www/html |
||||
# RUN mkdir -p /var/www/html && chown -R www-data:www-data /var/www/html |
||||
RUN chown -R nobody:nobody /var/www/html /run |
||||
|
||||
# Copy project files |
||||
COPY --chown=nobody . /var/www/html/ |
||||
|
||||
# Switch to the www-data user |
||||
# USER www-data |
||||
USER nobody |
||||
|
||||
# Set the working directory |
||||
WORKDIR /var/www/html |
||||
|
||||
EXPOSE 9000 |
||||
|
||||
# Run Composer install |
||||
CMD sh -c "composer install --no-dev --optimize-autoloader && php-fpm" |
||||
|
||||
USER root |
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
FROM php:8.2-fpm |
||||
|
||||
# EXPOSE 9000 |
||||
# Install any PHP extensions or packages you need |
||||
RUN apt-get update && apt-get install -y \ |
||||
git \ |
||||
curl \ |
||||
libpng-dev \ |
||||
libpq-dev \ |
||||
libjpeg-dev \ |
||||
libfreetype6-dev \ |
||||
zip \ |
||||
unzip \ |
||||
&& docker-php-ext-configure gd \ |
||||
&& docker-php-ext-install -j$(nproc) gd \ |
||||
&& docker-php-ext-install pdo pdo_pgsql pgsql mbstring exif bcmath pcntl |
||||
|
||||
# Ensure the www-data user and group match the host system |
||||
# RUN groupadd -g 1000 www-data && useradd -u 1000 -g www-data -s /bin/bash |
||||
# RUN useradd -u 1000 -g www-data -s /bin/bash |
||||
|
||||
# Copy composer from the official image |
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer |
||||
|
||||
|
||||
WORKDIR /var/www/html |
||||
|
||||
# ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ |
||||
# Install PHP extensions |
||||
RUN chmod +x /usr/local/bin/install-php-extensions; \ |
||||
|
||||
# Set permissions for /var/www/html |
||||
COPY --chown=www-data:www-data . /var/www/html |
||||
|
||||
# Copy project files |
||||
|
||||
USER www-data |
||||
|
||||
# Run Composer install |
||||
CMD bash -c "composer install --no-dev --optimize-autoloader" |
||||
|
@ -0,0 +1,65 @@
@@ -0,0 +1,65 @@
|
||||
version: '3' |
||||
|
||||
services: |
||||
caddy: |
||||
container_name: spa_caddy |
||||
build: .docker/caddy |
||||
ports: |
||||
- 80:80 |
||||
- 443:443 |
||||
volumes: |
||||
- ./:/var/www/html |
||||
- .docker/config/Caddyfile:/etc/caddy/Caddyfile |
||||
- .docker/data/logs/caddy:/var/log/caddy:delegated |
||||
depends_on: |
||||
- php-fpm |
||||
networks: |
||||
- internal |
||||
|
||||
php-fpm: |
||||
container_name: php_backend |
||||
build: |
||||
context: .docker/php-fpm |
||||
volumes: |
||||
- ./:/var/www/html:delegated |
||||
- .docker/data/logs/php:/var/log/php:delegated |
||||
env_file: |
||||
- .env |
||||
environment: |
||||
- REPO_URL= |
||||
- GEOSERVER_URL=geoserver_service |
||||
- GEOSERVER_USERNAME=admin |
||||
- GEOSERVER_PASSWORD=myawesomepw123 |
||||
- GEONETWORK_URL= |
||||
- GEONETWORK_API_KEY= |
||||
- GEONETWORK_API_VERSION= |
||||
- PG_USER= |
||||
- PG_PASS= |
||||
- PG_NAME= |
||||
- PG_HOST= |
||||
restart: unless-stopped |
||||
expose: |
||||
- 9000 |
||||
networks: |
||||
- internal |
||||
|
||||
geoserver: |
||||
container_name: geoserver_service |
||||
image: kartoza/geoserver |
||||
environment: |
||||
- GEOSERVER_ADMIN_USER=admin |
||||
- GEOSERVER_ADMIN_PASSWORD=myawesomepw123 |
||||
volumes: |
||||
- geoserver_data:/opt/geoserver/data_dir |
||||
expose: |
||||
- 8081 |
||||
ports: |
||||
- "8081:8081" |
||||
networks: |
||||
- internal |
||||
|
||||
volumes: |
||||
geoserver_data: |
||||
networks: |
||||
internal: |
||||
|
@ -1,9 +0,0 @@
@@ -1,9 +0,0 @@
|
||||
gulp.task('modules', function() { |
||||
sources = [ |
||||
'./node_modules/prismjs/prism.js', |
||||
'./node_modules/prismjs/themes/prism-dark.css', |
||||
] |
||||
gulp.src( sources ).pipe(gulp.dest('./public/modules/')); |
||||
}); |
||||
|
||||
gulp.task('copy-modules', ['modules']); |
Loading…
Reference in new issue