Made message signing in Cryptography use SHA512 as the message content for... #1
9 changed files with 32 additions and 8 deletions
22
Dockerfile
22
Dockerfile
|
@ -83,11 +83,12 @@ RUN ncc build --config release --build-source --log-level debug && \
|
||||||
RUN rm -rf /tmp/build && rm -rf /var/www/html/*
|
RUN rm -rf /tmp/build && rm -rf /var/www/html/*
|
||||||
|
|
||||||
# Copy over the required files
|
# Copy over the required files
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY public/index.php /var/www/html/index.php
|
COPY public/index.php /var/www/html/index.php
|
||||||
RUN chown -R www-data:www-data /var/www/html && chmod -R 755 /var/www/html
|
RUN chown -R www-data:www-data /var/www/html && chmod -R 755 /var/www/html
|
||||||
|
|
||||||
# ----------------------------- Cron Configuration ---------------------------
|
# ----------------------------- Environment Configuration ---------------------------
|
||||||
|
# Configure Cron
|
||||||
RUN echo "*/1 * * * * root for i in {1..12}; do /usr/bin/socialbox process-outgoing; sleep 5; done" > /etc/cron.d/socialbox-process-outgoing && \
|
RUN echo "*/1 * * * * root for i in {1..12}; do /usr/bin/socialbox process-outgoing; sleep 5; done" > /etc/cron.d/socialbox-process-outgoing && \
|
||||||
echo "*/1 * * * * root /usr/bin/socialbox session-cleanup" > /etc/cron.d/socialbox-session-cleanup && \
|
echo "*/1 * * * * root /usr/bin/socialbox session-cleanup" > /etc/cron.d/socialbox-session-cleanup && \
|
||||||
echo "*/5 * * * * root /usr/bin/socialbox peer-cleanup" > /etc/cron.d/socialbox-peer-cleanup && \
|
echo "*/5 * * * * root /usr/bin/socialbox peer-cleanup" > /etc/cron.d/socialbox-peer-cleanup && \
|
||||||
|
@ -100,9 +101,20 @@ RUN echo "*/1 * * * * root for i in {1..12}; do /usr/bin/socialbox process-outgo
|
||||||
crontab /etc/cron.d/socialbox-session-cleanup && \
|
crontab /etc/cron.d/socialbox-session-cleanup && \
|
||||||
crontab /etc/cron.d/socialbox-peer-cleanup
|
crontab /etc/cron.d/socialbox-peer-cleanup
|
||||||
|
|
||||||
# ----------------------------- Supervisor Configuration ---------------------
|
|
||||||
# Copy Supervisor configuration
|
# Copy Supervisor configuration
|
||||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
# Copy docker.conf & zz-docker.conf for PHP-FPM
|
||||||
|
COPY docker/docker.conf /usr/local/etc/php-fpm.d/docker.conf
|
||||||
|
COPY docker/zz-docker.conf /usr/local/etc/php-fpm.d/zz-docker.conf
|
||||||
|
|
||||||
|
# Configure php.ini and enable error and log it to /var/log rather than stdout
|
||||||
|
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini && \
|
||||||
|
sed -i 's/^;error_log = php_errors.log/error_log = \/var\/log\/php_errors.log/' /usr/local/etc/php/php.ini && \
|
||||||
|
sed -i 's/^;log_errors = On/log_errors = On/' /usr/local/etc/php/php.ini && \
|
||||||
|
sed -i 's/^;error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT/error_reporting = E_ALL/' /usr/local/etc/php/php.ini && \
|
||||||
|
sed -i 's/^;display_errors = Off/display_errors = On/' /usr/local/etc/php/php.ini && \
|
||||||
|
sed -i 's/^;date.timezone =/date.timezone = UTC/' /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------- Cleanup ---------------------
|
# ----------------------------- Cleanup ---------------------
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
@ -112,7 +124,7 @@ EXPOSE 8085
|
||||||
|
|
||||||
# ----------------------------- Container Startup ----------------------------
|
# ----------------------------- Container Startup ----------------------------
|
||||||
# Copy over entrypoint script and set it as executable
|
# Copy over entrypoint script and set it as executable
|
||||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
# Set the entrypoint
|
# Set the entrypoint
|
||||||
|
|
|
@ -95,7 +95,7 @@ services:
|
||||||
command: redis-server /usr/local/etc/redis/redis.conf --appendonly yes
|
command: redis-server /usr/local/etc/redis/redis.conf --appendonly yes
|
||||||
volumes:
|
volumes:
|
||||||
- coffee_redis_data:/data
|
- coffee_redis_data:/data
|
||||||
- ./redis.conf:/usr/local/etc/redis/redis.conf
|
- ./docker/redis.conf:/usr/local/etc/redis/redis.conf
|
||||||
networks:
|
networks:
|
||||||
- coffee_network
|
- coffee_network
|
||||||
expose:
|
expose:
|
||||||
|
@ -198,7 +198,7 @@ services:
|
||||||
command: redis-server /usr/local/etc/redis/redis.conf --appendonly yes
|
command: redis-server /usr/local/etc/redis/redis.conf --appendonly yes
|
||||||
volumes:
|
volumes:
|
||||||
- teapot_redis_data:/data
|
- teapot_redis_data:/data
|
||||||
- ./redis.conf:/usr/local/etc/redis/redis.conf
|
- ./docker/redis.conf:/usr/local/etc/redis/redis.conf
|
||||||
networks:
|
networks:
|
||||||
- teapot_network
|
- teapot_network
|
||||||
expose:
|
expose:
|
||||||
|
|
|
@ -85,7 +85,7 @@ services:
|
||||||
command: redis-server /usr/local/etc/redis/redis.conf --appendonly yes
|
command: redis-server /usr/local/etc/redis/redis.conf --appendonly yes
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data
|
- redis_data:/data
|
||||||
- ./redis.conf:/usr/local/etc/redis/redis.conf
|
- ./docker/redis.conf:/usr/local/etc/redis/redis.conf
|
||||||
networks:
|
networks:
|
||||||
- internal_network
|
- internal_network
|
||||||
expose:
|
expose:
|
||||||
|
|
2
docker/docker.conf
Normal file
2
docker/docker.conf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[www]
|
||||||
|
clear_env = no
|
10
docker/zz-docker.conf
Normal file
10
docker/zz-docker.conf
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[global]
|
||||||
|
daemonize=no
|
||||||
|
error_log = /var/log/php_fpm_error.log
|
||||||
|
log_limit = 1048576
|
||||||
|
log_level = notice
|
||||||
|
|
||||||
|
[www]
|
||||||
|
listen = 9000
|
||||||
|
catch_workers_output = yes
|
||||||
|
decorate_workers_output = no
|
Loading…
Add table
Reference in a new issue