diff --git a/.env.example b/.env.example index 730a996fc..35b523ec5 100644 --- a/.env.example +++ b/.env.example @@ -183,3 +183,5 @@ PAYPAL_SECRET= PAYPAL_TEST_MODE=false OTP_ENABLED=false + +COMPOSER_AUTH='{"github-oauth": {"github.com": "TOKEN_HERE"}}' \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 1d2c3f867..473c0f56f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,12 +13,12 @@ services: - '${APP_PORT:-80}:80' - '${VITE_PORT:-5173}:${VITE_PORT:-5173}' environment: + TZ: ${APP_TZ} + COMPOSER_AUTH: ${COMPOSER_AUTH} WWWUSER: '${WWWUSER}' LARAVEL_SAIL: 1 XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}' XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}' - env_file: - - docker/8.2/vars.env volumes: - '.:/var/www/html' networks: @@ -33,6 +33,7 @@ services: ports: - '${FORWARD_DB_PORT:-3306}:3306' environment: + TZ: ${APP_TZ} MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}' MYSQL_ROOT_HOST: '%' MYSQL_DATABASE: '${DB_DATABASE}' @@ -60,6 +61,8 @@ services: image: 'redis:alpine' ports: - '${FORWARD_REDIS_PORT:-6379}:6379' + environment: + TZ: ${APP_TZ} volumes: - 'sail-redis:/data' networks: @@ -81,11 +84,12 @@ services: manticore: image: manticoresearch/manticore environment: - - EXTRA=1 + TZ: ${APP_TZ} + EXTRA: 1 # Activates extra features restart: always ports: - - 127.0.0.1:9306:9306 - - 127.0.0.1:9308:9308 + - 9306:9306 + - 9308:9308 ulimits: nproc: 65535 nofile: @@ -102,6 +106,7 @@ services: # elasticsearch: # image: docker.elastic.co/elasticsearch/elasticsearch:8.6.2 # environment: +# - TZ=${APP_TZ} # - discovery.type=single-node # - xpack.security.enabled=false # - "ES_JAVA_OPTS=-Xms512m -Xmx512m" diff --git a/docker/8.2/Dockerfile b/docker/8.2/Dockerfile index b0e367fc6..a4be75fc3 100644 --- a/docker/8.2/Dockerfile +++ b/docker/8.2/Dockerfile @@ -8,11 +8,8 @@ ARG POSTGRES_VERSION=15 WORKDIR /var/www/html -ENV TZ="Europe/Amsterdam" ENV DEBIAN_FRONTEND noninteractive -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - RUN apt-get update \ && apt-get install -y gnupg gosu curl ca-certificates zip unzip unrar git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils \ && curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \ diff --git a/docker/8.2/README.md b/docker/8.2/README.md index b9bf53a7e..41d48d146 100644 --- a/docker/8.2/README.md +++ b/docker/8.2/README.md @@ -20,9 +20,9 @@ Mailpit is used as a fake mailserver which catches all e-mails in one inbox. You ## Setup -- Edit `vars.env` with your Github (scopeless) token - - See: https://github.com/settings/tokens/new?scopes=&description=Laravel+Dev+Env and set the expiration to **No expiration** - - Make sure your `.gitignore` contains this line: `docker/8.2/var.ens` +- Edit your projects `.env` file and add a `COMPOSER_AUTH` entry. + - Get a Github token: https://github.com/settings/tokens/new?scopes=&description=NNTMux+Docker and set the expiration to **No expiration** + - Example: `COMPOSER_AUTH='{"github-oauth": {"github.com": "ghp_xxxxxxxx"}}'` - `sail build --no-cache` - `sail up -d` diff --git a/docker/8.2/start-container b/docker/8.2/start-container index cd8c66eea..634366fd3 100644 --- a/docker/8.2/start-container +++ b/docker/8.2/start-container @@ -12,6 +12,9 @@ chmod -R ugo+rw /.composer addgroup supervisor > /dev/null 2>&1 usermod -a -G supervisor sail > /dev/null 2>&1 +# Set timezone +ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + if [ $# -gt 0 ]; then exec gosu $WWWUSER "$@" else diff --git a/docker/8.2/vars.env.dist b/docker/8.2/vars.env.dist deleted file mode 100644 index 7080665b1..000000000 --- a/docker/8.2/vars.env.dist +++ /dev/null @@ -1 +0,0 @@ -COMPOSER_AUTH='{"github-oauth": {"github.com": "TOKEN_HERE"}}' \ No newline at end of file