diff --git a/.env.default b/.env.default index 3ac884a..bfc475b 100644 --- a/.env.default +++ b/.env.default @@ -1,4 +1,5 @@ # One Sky IT's Aether Framework and System +TZ=US/Eastern CONTAINER_WEB=ae_web_default CONTAINER_AE_API=ae_api_default diff --git a/conf/aether_fastapi_requirements.txt b/conf/aether_fastapi_requirements.txt index d83acd9..17b7f53 100644 --- a/conf/aether_fastapi_requirements.txt +++ b/conf/aether_fastapi_requirements.txt @@ -21,7 +21,7 @@ email-validator et-xmlfile fastapi>=0.88.0 greenlet>=2.0.2 -gunicorn>=20.1.0 +gunicorn>=21.2.0 h11 html2text>=2020.1.16 httpcore diff --git a/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf b/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf index fd71109..e80a8d2 100644 --- a/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf +++ b/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf @@ -161,8 +161,10 @@ upstream fastapi_backend { # larger number will recieve more requests # Example of 20 vs 10: 20 will recieve twice as many requests as 10 - server aether_api_gunicorn:5005 weight=20 max_fails=3 fail_timeout=30s; - # server aether_api_gunicorn_bak:5005 weight=10 max_fails=1 fail_timeout=30s; + server aether_api_gunicorn:5005 weight=20 max_fails=2 fail_timeout=30s; + # server aether_api_gunicorn_red:5005 weight=20 max_fails=2 fail_timeout=30s; + # server aether_api_gunicorn_green:5005 weight=20 max_fails=2 fail_timeout=30s; + # server aether_api_gunicorn_blue:5005 weight=20 max_fails=2 fail_timeout=30s; # maintain up to 20 idle connections to the group of upstream servers # keepalive 20; diff --git a/docker-compose.yml b/docker-compose.yml index 4ccae93..1d4dd3b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -68,7 +68,7 @@ services: # volumes_from: # - nextcloud25 depends_on: - # - php7 + - php7 - aether_api_gunicorn # - aether_api_v5_gunicorn - aether_app_gunicorn @@ -81,65 +81,25 @@ services: # stdin_open: true # docker run -i # tty: true # docker run -t - # mailman2: - # image: d3fk/mailman2 - # container_name: ae_mailman2 - # # hostname: mails.oneskyit.com - # hostname: mail.localhost - # restart: unless-stopped - # ports: - # - "8889:80" - # # - "8443:443" - # - "2525:25" - # - "25465:465" - # - "25587:587" - # # env_file: - # # - ./conf/mailman2.env - # environment: - # - EMAIL_HOST=mail.oneskyit.com - # # - URL_HOST=lists.localhost - # - URL_HOST=mailman2-oneskyit.localhost - # - LIST_ADMIN=admin@oneskyit.com - # - MASTER_PASSWORD=strong_pass_321 - # - URL_PATTERN=http - # # - SSL_FROM_CONTAINER="true" - # # - SSL_SELFSIGNED="true" - # # - ENABLE_SPF_CHECK="true" - # - URL_ROOT=lists/ - # extra_hosts: - # - "mail.oneskyit.com:127.0.0.1" - # # - "oneskyit.com:the linode ip" - # volumes: - # - ./srv/mailman2/archives:/var/lib/mailman/archives - # - ./srv/mailman2/lists:/var/lib/mailman/lists - # - ./srv/mailman2/keys:/etc/exim4/tls.d - # - ./logs/mailman2/apache2:/var/log/apache2 - # - ./logs/mailman2/exim4:/var/log/exim4 - # - ./logs/mailman2/mailman:/var/log/mailman - # # - ./logs/mailman2/mailman_error.log:/var/lib/mailman/logs/error - # - # # - ./customcert.pem:/etc/ssl/certs/ssl-cert-snakeoil.pem - # # - ./customcertkey.key:/etc/ssl/private/ssl-cert-snakeoil.key + php7: + restart: always + container_name: ${CONTAINER_PHP7} + # image: php:fpm + build: + context: ./ + dockerfile: php7.Dockerfile + volumes: + - ./srv/html_php:/srv/html_php + - ./srv/oneskyit_site:/srv/oneskyit_site + # - ./srv/nextcloud:/srv/nextcloud - # php7: - # restart: always - # container_name: ${CONTAINER_PHP7} - # # image: php:fpm - # build: - # context: ./ - # dockerfile: php7.Dockerfile - # volumes: - # - ./srv/html_php:/srv/html_php - # - ./srv/oneskyit_site:/srv/oneskyit_site - # # - ./srv/nextcloud:/srv/nextcloud + - ./conf/php/custom_php7.ini:/usr/local/etc/php/conf.d/custom_php7.ini - # - ./conf/php/custom_php7.ini:/usr/local/etc/php/conf.d/custom_php7.ini - - # - ./logs/php7:/logs - # # ports: - # # - "9007:9000" - # # networks: - # # - local-net + - ./logs/php7:/logs + # ports: + # - "9007:9000" + # networks: + # - local-net # phpmyadmin: # image: phpmyadmin @@ -155,63 +115,14 @@ services: # - PMA_ARBITRARY=1 # - UPLOAD_LIMIT=1G - # mariadb: - # container_name: ae_mariadb_dev - # # image: mariadb/server:latest - # image: mariadb:10.9 - # # image: mariadb:10.6 - # restart: unless-stopped - # # env_file: - # # - ./.env - # # - filename.env - # # ports: - # # - "3307:3306" - # volumes: - # - ./srv/mariadb:/var/lib/mysql - # # - ./conf/mariadb/password_reset.sql:/docker-entrypoint-initdb.d/init.sql:ro - # # - ./conf/mariadb/password_reset.sql:/password_reset.sql:z - # # - ./srv/mariadb_ln:/var/lib/mysql - # # - ./conf/mariadb/my.cnf:/etc/my.cnf - # environment: - # - MARIADB_ROOT_PASSWORD=$$1sky.Adapting.7e2 - # # - MARIADB_ROOT_PASSWORD=CentauriStar123 - # # - MARIADB_DATABASE: 'my_env_db' - # # - MYSQL_ROOT_PASSWORD=$$1sky.Adapting.7e2 - # # - MYSQL_ROOT_PASSWORD=CentauriStar123 - # # - MYSQL_PASSWORD=MyPassword - # # - MYSQL_DATABASE=nextcloud - # # - MYSQL_USER=nextcloud - - # nextcloud25: - # container_name: ae_nextcloud25_dev - # build: - # # context: ./builds - # context: ./ - # dockerfile: nextcloud25_fpm.Dockerfile - # # image: nextcloud:fpm - # restart: unless-stopped - # links: - # - mariadb - # depends_on: - # - mariadb - # volumes: - # - ./srv/nextcloud/app:/var/www/html - # - ./srv/nextcloud/apps:/var/www/html/apps - # - ./srv/nextcloud/custom_apps:/var/www/html/custom_apps - # - ./srv/nextcloud/config:/var/www/html/config - # - ./srv/nextcloud/data:/var/www/html/data - # - ./srv/nextcloud/themes:/var/www/html/themes - # environment: - # - MYSQL_PASSWORD=MyPassword.1248 - # - MYSQL_DATABASE=nextcloud - # - MYSQL_USER=nextcloud - # - MYSQL_HOST=mariadb - # - NEXTCLOUD_TRUSTED_DOMAINS=oneskyit.com - redis: restart: always container_name: ${CONTAINER_REDIS} image: redis + # By default redis saves every 3600 seconds if there is at least 1 change. + command: redis-server --save "" --loglevel warning + # command: redis-server --save 60 1 --loglevel warning + # build: # ports: # # host to image # # default port is 6379 @@ -240,25 +151,13 @@ services: - ./conf/aether_api_config.py:/srv/aether_api/app/config.py - ./logs/ae_api:/logs - # - ./logs/ae_api/aether_fastapi_gunicorn.log:/logs/gunicorn.log - # - ./logs/aether_fastapi_gunicorn_access.log:/logs/gunicorn_access.log - # - ./logs/aether_fastapi_gunicorn_error.log:/logs/gunicorn_error.log - # - ./logs/aether_api.log:/logs/aether_api.log - # - ./logs/ae_api/aether_api.log.1:/logs/aether_api.log.1 - # - ./logs/ae_api/aether_api.log.2:/logs/aether_api.log.2 - # - ./logs/ae_api/aether_api.log.3:/logs/aether_api.log.3 - # - ./logs/ae_api/aether_api.log.4:/logs/aether_api.log.4 - # - ./logs/ae_api/aether_api.log.5:/logs/aether_api.log.5 - # - ./logs/ae_api/aether_api_warning.log:/logs/aether_api_warning.log - ./srv/aether_api_ln:/srv/aether_api - ./srv/hosted_files_ln:/srv/hosted_files - ./srv/hosted_tmp_ln:/srv/hosted_tmp # - ./tmp/ae_api:/tmp - - ./temp/ae_api:/temp - # - ./temp/ae_api/aether_fastapi_requirements_current.txt:/temp/requirements_current.txt # links: # - redis depends_on: @@ -319,7 +218,7 @@ services: - "${DOCKER_AE_SERVER_EXTRA_HOST}" - "${DOCKER_AE_API_SERVER_EXTRA_HOST}" - "${DOCKER_AE_API_BAK_SERVER_EXTRA_HOST}" - - "${DOCKER_AE_API_V5_SERVER_EXTRA_HOST}" + # - "${DOCKER_AE_API_V5_SERVER_EXTRA_HOST}" # - dev-api.oneskyit.com:192.168.32.20 volumes: - ./conf/aether_flask_gunicorn_conf.py:/conf/gunicorn_flask_conf.py