This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ConfiguredValues | |
{ | |
public static int Get(Func<DynamicLookup, dynamic> value, int defaultValue) | |
{ | |
int returnValue; | |
var globalSettingValue = value(DynamicLookup.Resolve); | |
if (globalSettingValue is int) | |
{ | |
returnValue = globalSettingValue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#run through the steps detailed here to install the odbc drivers for Ubuntu 20 | |
https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15#ubuntu17 | |
#then force pecl to use 7.2 | |
sudo pecl -d php_suffix=7.2 install sqlsrv-5.3.0 | |
sudo pecl -d php_suffix=7.2 install pdo_sqlsrv-5.3.0 | |
sudo bash -c 'echo "extension=sqlsrv.so" > /etc/php/7.2/mods-available/sqlsrv.ini' | |
sudo bash -c 'echo "extension=pdo_sqlsrv.so" > /etc/php/7.2/mods-available/pdo_sqlsrv.ini' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.2-fpm-buster | |
RUN apt-get update && \ | |
apt-get install -y cron | |
# TLDR: CRON and Docker don't play well together. | |
# | |
# The idiomatic way to handle logging in docker is to output to stdout. This is achieved by | |
# redirecting the program output to /proc/1/fd/1 e.g. * * * * * echo hello > /proc/1/fd/1 2>&1. However, if you have a | |
# non-root user cron job, this is not possible due to the non-root user not being able to write to /proc/1/fd/1 which |