Skip to content

Commit

Permalink
feat: add redis and specific Dockerfile examples
Browse files Browse the repository at this point in the history
  • Loading branch information
pifou25 committed Aug 17, 2024
1 parent f2f5523 commit 55a8b93
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 17 deletions.
7 changes: 1 addition & 6 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ RUN unzip -q /tmp/jeedom.zip -d /tmp/source/ && \
COPY install.htaccess ./install/.htaccess

# run composer for dependancies
RUN composer install \
--no-interaction \
--no-plugins \
--no-scripts \
--no-dev \
--prefer-dist
RUN composer install --no-progress --no-interaction --no-dev


# Build with 3 stages, 2 targets :
Expand Down
9 changes: 9 additions & 0 deletions build/Dockerfile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# prepare PHP source with dependencies
FROM php:8.2-cli-bookworm

RUN apt-get update && \
apt-get install --no-install-recommends --no-install-suggests -q -y zip
WORKDIR /app

# download & run composer for dependancies
COPY --from=composer/composer:latest-bin /composer /usr/bin/composer
7 changes: 1 addition & 6 deletions build/Dockerfile.source
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@ RUN unzip -q /tmp/jeedom.zip -d /tmp/source/ && \
COPY install.htaccess ./install/.htaccess

# run composer for dependancies
RUN ls -alsh && composer install \
--no-interaction \
--no-plugins \
--no-scripts \
--no-dev \
--prefer-dist
RUN composer install --no-progress --no-interaction --no-dev
2 changes: 1 addition & 1 deletion build/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ html_errors = On
; empty.
; http://php.net/error-log
; Example:
;error_log = php_errors.log
error_log = /var/www/html/logs/php_errors.log
; Log errors to syslog (Event Log on Windows).
;error_log = syslog

Expand Down
21 changes: 17 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
version: '3.8'

networks:
networks:
default:
name: jeedom_network

Expand Down Expand Up @@ -125,4 +123,19 @@ services:
interval: 1m
timeout: 10s
retries: 3
start_period: 10s
start_period: 10s

# redis service for cache
redis:
image: redis
volumes:
- ./volumes/cache:/data
logging:
options:
max-size: "10m"
max-file: "1"
restart: unless-stopped
environment:
- TZ=Europe/Paris
ports:
- 6379:6379

0 comments on commit 55a8b93

Please sign in to comment.