Compare commits

...

64 Commits

Author SHA1 Message Date
hackerESQ bdd30c238c Merge pull request #52 from investbrainapp/optimize-dockerfile
Optimize Docker Image
2025-01-26 21:59:56 -06:00
hackerESQ 778d799113 cleanup 2025-01-26 21:56:41 -06:00
hackerESQ 47cd1b6a91 wip 2025-01-26 21:54:56 -06:00
hackerESQ 118232e906 update readme 2025-01-26 21:50:25 -06:00
hackerESQ 64c84fe708 wip 2025-01-26 21:46:59 -06:00
hackerESQ cff3c02851 wip 2025-01-26 21:45:38 -06:00
hackerESQ 60577d02c7 wip 2025-01-26 21:45:17 -06:00
hackerESQ 99749bd9c9 this is it 2025-01-26 21:42:39 -06:00
hackerESQ b3ca2e5927 wip 2025-01-26 21:38:59 -06:00
hackerESQ b71e9e2e80 make info messages pop 2025-01-26 21:33:49 -06:00
hackerESQ 72a8aacabe wip 2025-01-26 21:30:12 -06:00
hackerESQ a0e9cfb40d wip 2025-01-26 21:24:59 -06:00
hackerESQ 46707c1149 wip 2025-01-26 21:20:02 -06:00
hackerESQ 497efcfa76 wip 2025-01-26 21:08:48 -06:00
hackerESQ 1201c248ee cleanup 2025-01-26 21:06:08 -06:00
hackerESQ 395eb31801 wip 2025-01-26 20:40:44 -06:00
hackerESQ b27edd9818 wip 2025-01-26 11:36:42 -06:00
hackerESQ 51c43e9893 make sure key is set 2025-01-26 11:31:07 -06:00
hackerESQ ec2019430e ensure storage is there 2025-01-26 11:28:20 -06:00
hackerESQ 05174e93ad wip 2025-01-26 11:20:52 -06:00
hackerESQ e8ec94bfa8 add in-line docs to env 2025-01-25 23:36:33 -06:00
hackerESQ c6642e028c updat example env 2025-01-25 23:30:00 -06:00
hackerESQ 6d5a5f46b9 update readme for new install instructions 2025-01-25 23:17:21 -06:00
hackerESQ e651eb86ca bump front end 2025-01-25 22:56:22 -06:00
hackerESQ 84171da29b bump php version 2025-01-25 22:55:45 -06:00
hackerESQ d463ec689b last one 2025-01-25 22:54:10 -06:00
hackerESQ 416a82058b getting close 2025-01-25 22:52:44 -06:00
hackerESQ 6f2324ad1b wip 2025-01-25 22:37:26 -06:00
hackerESQ c19f13edc1 wip 2025-01-25 22:36:48 -06:00
hackerESQ 390b137e0b wiiiip 2025-01-25 22:33:27 -06:00
hackerESQ 0c7d4a83f1 wip 2025-01-25 22:24:51 -06:00
hackerESQ 25112cb03a wip 2025-01-25 22:22:42 -06:00
hackerESQ 5ade4b35a0 wip 2025-01-25 22:19:54 -06:00
hackerESQ 00067c56d4 wip 2025-01-25 22:08:07 -06:00
hackerESQ 620566490b wip 2025-01-25 21:57:50 -06:00
hackerESQ 7245f4cc69 wip 2025-01-25 21:53:55 -06:00
hackerESQ 575fecb163 wip 2025-01-25 21:43:58 -06:00
hackerESQ 4120b1abfa set permission in entry script 2025-01-25 21:34:18 -06:00
hackerESQ 801d3739fc wip 2025-01-25 21:21:08 -06:00
hackerESQ 92bdf14508 wip 2025-01-25 21:17:27 -06:00
hackerESQ fa25a82693 wip 2025-01-25 21:12:16 -06:00
hackerESQ 1684f3e0cb wip 2025-01-25 21:06:54 -06:00
hackerESQ a31f807da8 wip 2025-01-25 20:49:24 -06:00
hackerESQ 6d92b49f3d wip 2025-01-25 20:46:40 -06:00
hackerESQ 11cdf975bc wip 2025-01-25 20:40:26 -06:00
hackerESQ 7bacc28e3b wip 2025-01-25 20:37:50 -06:00
hackerESQ 4bbb71d434 wip 2025-01-25 20:34:03 -06:00
hackerESQ 8da153a476 wip 2025-01-25 20:31:40 -06:00
hackerESQ 1189325638 wip 2025-01-25 20:28:38 -06:00
hackerESQ e93459ae55 wip 2025-01-25 20:25:25 -06:00
hackerESQ b1fcf51546 wip 2025-01-25 20:21:38 -06:00
hackerESQ 75716368bb wip 2025-01-25 20:20:56 -06:00
hackerESQ ec15e2bb63 wip 2025-01-25 20:15:21 -06:00
hackerESQ 9a3e030ce7 wip 2025-01-25 20:13:19 -06:00
hackerESQ 4f5894ef4a wip 2025-01-25 18:41:20 -06:00
hackerESQ e0b5610d90 wip 2025-01-25 18:35:18 -06:00
hackerESQ bc34519a26 wip 2025-01-25 18:22:12 -06:00
hackerESQ dc69bfa8c7 make php extensions required 2025-01-25 18:18:31 -06:00
hackerESQ cf7c5fc23a wip 2025-01-25 18:12:55 -06:00
hackerESQ 16d5b80657 wip 2025-01-25 18:09:02 -06:00
hackerESQ 8dd153fb53 docs: added more badges 2025-01-17 12:46:29 -06:00
hackerESQ 89bfb28019 docs: add badges 2025-01-15 22:37:03 -06:00
hackerESQ 1215e47297 Merge pull request #49 from investbrainapp/upgrade-laravel
chore: upgrade composer deps
2024-12-26 12:34:53 -06:00
hackerESQ 4016899179 chore: upgrade composer deps 2024-12-26 12:34:29 -06:00
15 changed files with 1216 additions and 694 deletions
+7 -1
View File
@@ -7,4 +7,10 @@ tests
.DS_Store .DS_Store
vapor.yml vapor.yml
.vapor .vapor
storage storage/app/livewire-tmp/*
storage/app/public/profile-photos/*
storage/framework/cache/*
storage/framework/sessions/*
storage/framework/testing/*
storage/framework/views/*
storage/framework/logs/*
+24 -9
View File
@@ -1,24 +1,35 @@
APP_NAME=Investbrain # Generate a secure key using `openssl rand -base64 32`
APP_ENV=production
APP_KEY= APP_KEY=
APP_DEBUG=true
APP_TIMEZONE=UTC # Port for NGINX to listen on
APP_PORT=8000 APP_PORT=8000
# Used internally to generate absolute links
APP_URL="http://localhost:${APP_PORT}" APP_URL="http://localhost:${APP_PORT}"
SELF_HOSTED=true
# Webroot for static assets (css, js, images, etc)
ASSET_URL="${APP_URL}"
# Enables or disables new user registration
REGISTRATION_ENABLED=true REGISTRATION_ENABLED=true
# ASSET_URL="http://localhost:8000" # (optional) webroot for static assets (css, js, images, etc) # Enable or disable AI chat feature
AI_CHAT_ENABLED=false AI_CHAT_ENABLED=false
# API key for OpenAI (for Llama support, see docs)
OPENAI_API_KEY= OPENAI_API_KEY=
OPENAI_ORGANIZATION= OPENAI_ORGANIZATION=
# Market data provider to use (comma separated list)
MARKET_DATA_PROVIDER=yahoo MARKET_DATA_PROVIDER=yahoo
MARKET_DATA_REFRESH=30
ALPHAVANTAGE_API_KEY= ALPHAVANTAGE_API_KEY=
FINNHUB_API_KEY= FINNHUB_API_KEY=
# Cadence to refresh market data (in minutes)
MARKET_DATA_REFRESH=30
DAILY_CHANGE_TIME=
#### Advanced configurations ####
ENABLED_LOGIN_PROVIDERS= ENABLED_LOGIN_PROVIDERS=
GITHUB_CLIENT_ID= GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET= GITHUB_CLIENT_SECRET=
@@ -29,9 +40,13 @@ LINKEDIN_CLIENT_SECRET=
FACEBOOK_CLIENT_ID= FACEBOOK_CLIENT_ID=
FACEBOOK_CLIENT_SECRET= FACEBOOK_CLIENT_SECRET=
APP_NAME=Investbrain
APP_TIMEZONE=UTC
APP_ENV=production
APP_DEBUG=true
APP_LOCALE=en APP_LOCALE=en
APP_FALLBACK_LOCALE=en APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US SELF_HOSTED=true
DB_CONNECTION=mysql DB_CONNECTION=mysql
DB_HOST=investbrain-mysql DB_HOST=investbrain-mysql
+22 -13
View File
@@ -1,5 +1,13 @@
<p align="center"><a href="https://investbra.in" target="_blank"><img src="https://raw.githubusercontent.com/investbrainapp/investbrain/main/investbrain-logo.png" width="400" alt="Investbrain Logo"></a></p> <p align="center"><a href="https://investbra.in" target="_blank"><img src="https://raw.githubusercontent.com/investbrainapp/investbrain/main/investbrain-logo.png" width="400" alt="Investbrain Logo"></a></p>
[![GitHub Repo Stars](https://img.shields.io/github/stars/investbrainapp/investbrain?style=for-the-badge&color=%23CCCCCC)](https://github.com/investbrainapp/investbrain/)
[![GitHub Contributors](https://img.shields.io/github/contributors/investbrainapp/investbrain?style=for-the-badge)](https://github.com/investbrainapp/investbrain/)
[![GitHub Issues](https://img.shields.io/github/issues/investbrainapp/investbrain?style=for-the-badge)](https://github.com/investbrainapp/investbrain/issues)
[![Docker Pulls](https://img.shields.io/docker/pulls/investbrainapp/investbrain?style=for-the-badge)](https://hub.docker.com/r/investbrainapp/investbrain/)
## About Investbrain ## About Investbrain
Investbrain is a smart open-source investment tracker that helps you manage, track, and make informed decisions about your investments. Investbrain is a smart open-source investment tracker that helps you manage, track, and make informed decisions about your investments.
@@ -24,27 +32,27 @@ Investbrain is a Laravel PHP web application that leverages Livewire and Tailwin
## Self hosting ## Self hosting
For ease of installation, we _highly recommend_ installing Investbrain using the provided [Docker Compose](https://github.com/investbrainapp/investbrain/blob/main/docker-compose.yml) file, which downloads all the necessary dependencies and seamlessly builds everything you need to get started quickly! For ease of installation, we _highly recommend_ installing Investbrain using the provided [Docker Compose](https://github.com/investbrainapp/investbrain/blob/main/docker-compose.yml) file, which uses the official Investbrain Docker image and includes all the necessary dependencies to seamlessly build everything you need to get started quickly!
Before getting started, you should already have the following installed on your machine: [Docker Engine](https://docs.docker.com/engine/install/), [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), and a wild sense of adventure. Before getting started, you should already have [Docker Engine](https://docs.docker.com/engine/install/) installed on your machine.
Ready? Let's get started! Ready? Let's get started!
First, you can clone this repository: **1. Copy Docker Compose file**
```bash Grab a copy of the [docker-compose.yml](https://github.com/investbrainapp/investbrain/blob/main/docker-compose.yml)** file and paste the contents into the directory where you plan to install Investbrain.
git clone https://github.com/investbrainapp/investbrain.git && cd investbrain
```
Then, build the Docker image and bring up the container (this will take a few minutes): **2. Set your environment**
```bash Adjust the `environment` properties in the Docker Compose file to your preferences.
docker compose up
```
In the previous step, all of the default configurations are set automatically. This includes creating a .env file and setting the required Laravel `APP_KEY`. _Particularly_, you need to set the `APP_KEY` value to a complex random value. If you're unsure, you can run `openssl rand -base64 32` from your terminal to generate a strong application key.
If everything worked as expected, you should now be able to access Investbrain in the browser at. You should create an account by visiting: > Tip: Want to know what options are available? You can reference the [.env.example](https://github.com/investbrainapp/investbrain/blob/main/.env.example) file in this respository for available environment configurations.
**3. Run `docker compose up`**
This might take a few minutes. But if everything worked as expected, you should now be able to access Investbrain in the browser by visiting:
```bash ```bash
http://localhost:8000/register http://localhost:8000/register
@@ -127,6 +135,7 @@ There are several optional configurations available when installing using the re
| ------------- | ------------- | ------------- | | ------------- | ------------- | ------------- |
| APP_URL | The URL where your Investbrain installation will be accessible | http://localhost | | APP_URL | The URL where your Investbrain installation will be accessible | http://localhost |
| APP_PORT | The HTTP port exposed by the NGINX container | 8000 | | APP_PORT | The HTTP port exposed by the NGINX container | 8000 |
| APP_KEY | Must be set during install - encryption key for various security-related functions | `null` |
| MARKET_DATA_PROVIDER | The market data provider to use (either `yahoo`, `alphavantage`, or `finnhub`) | yahoo | | MARKET_DATA_PROVIDER | The market data provider to use (either `yahoo`, `alphavantage`, or `finnhub`) | yahoo |
| ALPHAVANTAGE_API_KEY | If using the Alpha Vantage provider | `null` | | ALPHAVANTAGE_API_KEY | If using the Alpha Vantage provider | `null` |
| FINNHUB_API_KEY | If using the Finnhub provider | `null` | | FINNHUB_API_KEY | If using the Finnhub provider | `null` |
@@ -141,7 +150,7 @@ There are several optional configurations available when installing using the re
| REGISTRATION_ENABLED | Whether to enable registration of new users | `true` | | REGISTRATION_ENABLED | Whether to enable registration of new users | `true` |
> Note: These options affect the [docker-compose.yml](https://github.com/investbrainapp/investbrain/blob/main/docker-compose.yml) file, so if you decide to make any changes to these default configurations, you'll have to restart the Docker containers before your changes take effect. > Note: These options affect the [docker-compose.yml](https://github.com/investbrainapp/investbrain/blob/main/docker-compose.yml) file and are cached during run-time. If change any .env values, you'll have to restart the containers before your changes take effect.
## Updating ## Updating
+5 -2
View File
@@ -5,9 +5,12 @@
"keywords": ["stocks", "dividends", "investments", "tracking"], "keywords": ["stocks", "dividends", "investments", "tracking"],
"license": "CC-BY-NC 4.0", "license": "CC-BY-NC 4.0",
"require": { "require": {
"php": "^8.2", "php": "^8.3",
"ext-gd": "*",
"ext-mbstring": "*",
"ext-zip": "*",
"finnhub/client": "master@dev", "finnhub/client": "master@dev",
"laravel/framework": "^11.9", "laravel/framework": "^11.35",
"laravel/jetstream": "^5.1", "laravel/jetstream": "^5.1",
"laravel/sanctum": "^4.0", "laravel/sanctum": "^4.0",
"laravel/socialite": "^5.16", "laravel/socialite": "^5.16",
Generated
+573 -337
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -13,7 +13,7 @@ return [
| |
*/ */
'name' => env('APP_NAME', 'Laravel'), 'name' => env('APP_NAME', 'Investbrain'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
+1 -1
View File
@@ -143,7 +143,7 @@ return [
'redis' => [ 'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'), 'client' => env('REDIS_CLIENT', 'predis'),
'options' => [ 'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'), 'cluster' => env('REDIS_CLUSTER', 'redis'),
+1 -1
View File
@@ -110,7 +110,7 @@ return [
'from' => [ 'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'), 'name' => env('MAIL_FROM_NAME', 'Investbrain'),
], ],
]; ];
+19 -18
View File
@@ -7,10 +7,24 @@ services:
container_name: investbrain-app container_name: investbrain-app
restart: unless-stopped restart: unless-stopped
tty: true tty: true
expose: ports:
- "9000" - "${APP_PORT:-8000}:80"
environment:
- APP_KEY= # Generate a key using `openssl rand -base64 32`
- APP_URL="http://localhost:8000"
- ASSET_URL="http://localhost:8000"
- DB_CONNECTION=mysql
- DB_HOST=investbrain-mysql
- DB_PORT=3306
- DB_DATABASE=investbrain
- DB_USERNAME=investbrain
- DB_PASSWORD=investbrain
- SESSION_DRIVER=redis
- QUEUE_CONNECTION=redis
- CACHE_STORE=redis
- REDIS_HOST=investbrain-redis
volumes: volumes:
- .:/var/www/app:delegated - ./storage:/var/www/app/storage:delegated
depends_on: depends_on:
- mysql - mysql
- redis - redis
@@ -25,20 +39,6 @@ services:
- investbrain-network - investbrain-network
volumes: volumes:
- investbrain-redis:/data - investbrain-redis:/data
nginx:
image: nginx:alpine
container_name: investbrain-nginx
restart: unless-stopped
tty: true
ports:
- "${APP_PORT:-8000}:80"
volumes:
- ./docker/nginx.conf:/etc/nginx/conf.d/default.conf
- .:/var/www/app:delegated
depends_on:
- app
networks:
- investbrain-network
mysql: mysql:
image: mysql:8.0 image: mysql:8.0
container_name: investbrain-mysql container_name: investbrain-mysql
@@ -48,8 +48,9 @@ services:
MYSQL_USER: ${DB_USERNAME:-investbrain} MYSQL_USER: ${DB_USERNAME:-investbrain}
MYSQL_PASSWORD: ${DB_PASSWORD:-investbrain} MYSQL_PASSWORD: ${DB_PASSWORD:-investbrain}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-investbrain} MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-investbrain}
command:
- --cte-max-recursion-depth=25000
volumes: volumes:
- ./docker/mysql.conf:/etc/mysql/conf.d/my.cnf
- investbrain-mysql:/var/lib/mysql - investbrain-mysql:/var/lib/mysql
networks: networks:
- investbrain-network - investbrain-network
+38 -24
View File
@@ -1,45 +1,59 @@
FROM php:8.3-fpm FROM php:8.3-fpm
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV APP_NAME=Investbrain
ENV VITE_APP_NAME=Investbrain
ENV APP_DEBUG=true
ENV SELF_HOSTED=true
# Set the working directory # Set the working directory
COPY . /var/www/app COPY . /var/www/app
WORKDIR /var/www/app WORKDIR /var/www/app
# Set permissions
RUN chown -R www-data:www-data . \
&& chmod -R 775 ./storage \
&& chmod +x ./docker/entrypoint.sh \
# Install common php extension dependencies # Install common php extension dependencies
&& apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
nginx \
libfreetype-dev \ libfreetype-dev \
libjpeg62-turbo-dev \ libjpeg62-turbo-dev \
libpng-dev \ libpng-dev \
zlib1g-dev \ zlib1g-dev \
libzip-dev \ libzip-dev \
unzip \
libicu-dev \ libicu-dev \
git \ libpq-dev \
curl \
supervisor \ supervisor \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \ && docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \ && docker-php-ext-install -j$(nproc) \
gd \ gd pgsql bcmath zip pdo_mysql mysqli intl \
zip \ && apt-get -y autoremove \
pdo_mysql \ && apt-get clean \
mysqli \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
intl \
# Install Node.js and npm
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm@latest
# Copy over supervisor configuration # Set permissions
RUN chown -R www-data:www-data . \
&& chmod -R 775 ./storage \
&& chmod +x ./docker/entrypoint.sh \
&& usermod -s /bin/bash www-data
# Install Composer and Node.js
RUN apt-get update && apt-get install -y \
curl \
unzip \
git \
nodejs \
npm \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install PHP dependencies and build front end assets
RUN composer install --no-scripts --optimize-autoloader \
&& npm install && npm run build
# Remove default nginx config
RUN rm /etc/nginx/sites-enabled/default
# Copy over configs
COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Install composer
COPY --from=composer:2.6.5 /usr/bin/composer /usr/local/bin/composer
# Serve on port 80 # Serve on port 80
EXPOSE 80 EXPOSE 80
@@ -48,4 +62,4 @@ HEALTHCHECK --interval=30s --timeout=10s --retries=3 CMD curl -f http://localhos
# Run everything else # Run everything else
ENTRYPOINT ["/bin/bash", "./docker/entrypoint.sh"] ENTRYPOINT ["/bin/bash", "./docker/entrypoint.sh"]
CMD ["./docker/entrypoint.sh"]
+33 -30
View File
@@ -2,53 +2,56 @@
cd /var/www/app cd /var/www/app
echo -e "\n====================== Running entrypoint script... ====================== "
if [ ! -f ".env" ]; then
echo " > Ope, gotta create an .env file!"
cp .env.example .env
fi
echo -e "\n====================== Installing Composer dependencies... ====================== "
/usr/local/bin/composer install
echo -e "\n====================== Validating environment... ====================== " echo -e "\n====================== Validating environment... ====================== "
if [ $(stat -c '%U' .) != "www-data" ]; then if [[ -z "$APP_KEY" ]]; then
echo " > Setting correct permissions for pwd..." echo -e "\n > Oops! The required APP_KEY configuration is missing in your environment! "
chown -R www-data:www-data . echo -e "\n > Generating a key (see below) but this will NOT be persisted between container restarts. "
echo -e "\n > You should set this APP_KEY in your .env file! "
draw_box() {
local text="$1"
local length=${#text}
local border=$(printf '%*s' "$((length + 4))" | tr ' ' '*')
echo -e "\n\n$border"
echo "* $text *"
echo "$border"
}
export APP_KEY=base64:$(openssl rand -base64 32)
draw_box $APP_KEY
fi fi
if ( ! grep -q "^APP_KEY=" ".env" || grep -q "^APP_KEY=$" ".env"); then for dir in storage/framework/cache storage/framework/sessions storage/framework/views; do
echo " > Ah, APP_KEY is missing in .env file. Generating a new key!" if [ ! -d "$dir" ]; then
echo -e "\n > $dir is missing. Creating scaffold for storage directory... "
/usr/local/bin/php artisan key:generate --force mkdir -p storage/framework/{cache,sessions,views}
fi chmod -R 775 storage
chown -R www-data:www-data storage
fi
done
if [ ! -L "public/storage" ]; then if [ ! -L "public/storage" ]; then
echo " > Creating symbolic link for app public storage..." echo -e "\n > Creating symbolic link for app public storage... "
/usr/local/bin/php artisan storage:link /usr/local/bin/php /var/www/app/artisan storage:link
fi fi
echo -e "\n====================== Installing NPM dependencies and building frontend... ====================== "
/usr/bin/npm install
/usr/bin/npm run build
echo -e "\n====================== Running migrations... ====================== " echo -e "\n====================== Running migrations... ====================== "
run_migrations() { run_migrations() {
/usr/local/bin/php artisan migrate --force /usr/local/bin/php /var/www/app/artisan migrate --force
} }
RETRIES=30 RETRIES=10
DELAY=5 DELAY=5
until run_migrations; do until run_migrations; do
RETRIES=$((RETRIES-1)) RETRIES=$((RETRIES-1))
if [ $RETRIES -le 0 ]; then if [ $RETRIES -le 0 ]; then
echo " > Database is not ready after multiple attempts. Exiting..." echo -e "\n > Database is not ready after $RETRIES attempts. Exiting... "
exit 1 exit 1
fi fi
echo " > Waiting for database to be ready... retrying in $DELAY seconds." echo -e "\n > Waiting for database to be ready... retrying in $DELAY seconds. "
sleep $DELAY sleep $DELAY
done done
echo -e "\n====================== Spinning up Supervisor daemon... ====================== " echo -e "\n====================== Spinning up Supervisor daemon... ====================== \n"
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
-2
View File
@@ -1,2 +0,0 @@
[mysqld]
cte_max_recursion_depth = 25000
+1 -1
View File
@@ -14,7 +14,7 @@ server {
fastcgi_param HTTPS $http_x_forwarded_proto; fastcgi_param HTTPS $http_x_forwarded_proto;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass investbrain-app:9000; fastcgi_pass 127.0.0.1:9000;
} }
location ~ /\.ht { location ~ /\.ht {
+11 -11
View File
@@ -1,34 +1,34 @@
[supervisord] [supervisord]
nodaemon=true nodaemon=true
user=root user=root
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid pidfile=/var/run/supervisord.pid
[program:nginx]
command=nginx -g 'daemon off;'
autostart=true
autorestart=true
redirect_stderr=true
redirect_stdout=true
[program:php] [program:php]
command=php-fpm -F command=php-fpm -F
autostart=true autostart=true
autorestart=true autorestart=true
stdout_logfile=/var/log/supervisor/php.log redirect_stderr=true
stderr_logfile=/var/log/supervisor/php_error.log redirect_stdout=true
[program:scheduler] [program:scheduler]
command=php artisan schedule:work command=php artisan schedule:work
autorestart=true autorestart=true
redirect_stderr=true redirect_stderr=true
stdout_logfile=/dev/stdout redirect_stdout=true
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:queue-worker] [program:queue-worker]
command=php artisan queue:work --sleep=3 --tries=1 --memory=256 --timeout=3600 command=php artisan queue:work --sleep=3 --tries=1 --memory=256 --timeout=3600
process_name=%(program_name)s_%(process_num)02d process_name=%(program_name)s_%(process_num)02d
autorestart=true autorestart=true
redirect_stderr=true redirect_stderr=true
stdout_logfile=/dev/stdout redirect_stdout=true
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
numprocs=2 numprocs=2
[supervisorctl] [supervisorctl]
+480 -243
View File
File diff suppressed because it is too large Load Diff