From 3e6c8db324e0e56a92222fb2f5247d0bf9b0ef8a Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Sun, 16 Apr 2023 22:54:27 -0400 Subject: [PATCH] General clean up --- .env.default | 2 +- README.md | 23 +++++++++++++++++++++-- conf/certs/.gitignore | 3 ++- conf/certs/README.md | 14 ++++++++++++++ docker-compose.yml | 2 +- srv/README.md | 8 +++++++- 6 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 conf/certs/README.md diff --git a/.env.default b/.env.default index d479be2..e1932c5 100644 --- a/.env.default +++ b/.env.default @@ -40,7 +40,7 @@ AE_API_SECRET_KEY=the-secret-api-key AE_DB_SERVER=linode.oneskyit.com AE_DB_PORT=3306 AE_DB_NAME=aether_dev -# AE_DB_USERNAME=osit_aether +AE_DB_USERNAME=osit_aether AE_DB_PASSWORD="the password with $$ escape" ## Aether Redis access and use diff --git a/README.md b/README.md index 1bd4961..f572d0e 100644 --- a/README.md +++ b/README.md @@ -25,25 +25,40 @@ sudo chown -R scott:scott /srv/env/test_aether/srv/mariadb/ cp /srv/env/test_aether/.env /srv/env/test_aether/.env.bak cp /srv/env/test_aether/.env.default /srv/env/test_aether/.env ``` -**/.env** -```sh +**/.env [very basic example]** +```cnf # One Sky IT's Aether Framework and System OSIT_ENV=development # Aether general shared config options +AE_CFG_ID=0 + ## Aether API access and use ## Aether DB access and use +AE_DB_PASSWORD="the password with $$ escape" ## Aether Redis access and use ## Aether SMTP access and use # Aether API specific config options (FastAPI) # Aether app specific config (Flask with Svelte) +AE_APP_CFG_ID=0 KEY="The Value" ``` +#### Part 4 - Still figuruing things out... +Update /etc/hosts with something like this. +```cnf +127.0.0.1 dev-api.oneskyit.com dev-app.oneskyit.com +127.0.0.1 dev-demo.oneskyit.com dev-businessgroup.oneskyit.com dev-ishlt.oneskyit.com +``` + +* Nothing in aether_flask_gunicorn_conf.py needs to be changed? +* Nothing in aether_fastapi_gunicorn_conf.py needs to be changed? +* Nothing in aether_api_config.py needs to be changed? +* Nothing in aether_app_config.py needs to be changed? ## Manage Docker Compose Environment ```bash @@ -52,8 +67,12 @@ docker restart ae_app_dev docker restart ae_mariadb_dev ``` + + --- + + ## More Notes diff --git a/conf/certs/.gitignore b/conf/certs/.gitignore index 9ce0361..0595e36 100644 --- a/conf/certs/.gitignore +++ b/conf/certs/.gitignore @@ -1,4 +1,5 @@ # Ignore everything in this directory * # Except for this file -!.gitignore \ No newline at end of file +!.gitignore +!README.md diff --git a/conf/certs/README.md b/conf/certs/README.md new file mode 100644 index 0000000..085d9b2 --- /dev/null +++ b/conf/certs/README.md @@ -0,0 +1,14 @@ +Create a links to the pem files +* ./conf/certs/oneskyit.com_fullchain.pem +* ./conf/certs/privkey.pem +* ./conf/certs/ssl-dhparams.pem + +## Copy certs +### Copy Let's Encrypt +Does the ownership or other permissions need to change? +```bash +sudo cp /etc/letsencrypt/live/oneskyit.com-0001/fullchain.pem /srv/env/test_aether/conf/certs/fullchain.pem +sudo cp /etc/letsencrypt/live/oneskyit.com-0001/privkey.pem /srv/env/test_aether/conf/certs/privkey.pem +sudo cp /etc/letsencrypt/ssl-dhparams.pem /srv/env/test_aether/conf/certs/ssl-dhparams.pem +# sudo chown -R scott:scott ~/srv/env/test_aether/certs/ +``` \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index f54f4ba..eccf596 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -174,7 +174,7 @@ services: # image: mariadb/server:latest image: mariadb:10.9 # image: mariadb:10.6 - restart: always + restart: unless-stopped # env_file: # - ./.env # - filename.env diff --git a/srv/README.md b/srv/README.md index 1f7703f..0f39f65 100644 --- a/srv/README.md +++ b/srv/README.md @@ -25,6 +25,9 @@ ln -s ~/OSIT_dev/aether_api_fastapi ~/OSIT_dev/aether_container_env/srv/aether_a ln -s /mnt/data/speaker_ready/hosted_tmp /srv/env/test_aether/srv/hosted_tmp_ln ln -s /mnt/data_drive/srv/data/osit_app/hosted_tmp /home/scott/OSIT_dev/aether_container_env/srv/hosted_tmp_ln ln -s /mnt/data_drive/srv/data/osit_app/hosted_tmp_dev /home/scott/OSIT_dev/aether_container_env/srv/hosted_tmp_ln + +# scott-laptop-main: +ln -s /data/OSIT/hosted_tmp /home/scott/OSIT_dev/aether_container_env/srv/hosted_tmp_ln ``` ### Hosted (hashed) files @@ -32,6 +35,9 @@ ln -s /mnt/data_drive/srv/data/osit_app/hosted_tmp_dev /home/scott/OSIT_dev/aeth ln -s /mnt/data/speaker_ready/hosted_files /srv/env/test_aether/srv/hosted_files_ln ln -s /mnt/data_drive/srv/data/osit_app/hosted_files /home/scott/OSIT_dev/aether_container_env/srv/hosted_files_ln ln -s /mnt/data_drive/srv/data/osit_app/hosted_files_dev /home/scott/OSIT_dev/aether_container_env/srv/hosted_files_ln + +# scott-laptop-main: +ln -s /data/OSIT/hosted_files /home/scott/OSIT_dev/aether_container_env/srv/hosted_files_ln ``` ### MariaDB @@ -40,4 +46,4 @@ sudo rsync -vhr -progress /var/lib/mysql/ /srv/env/test_aether/srv/mariadb/ rsync -v /var/lib/mysql/ /srv/env/test_aether/srv/mariadb/ sudo chown -R scott:scott /srv/env/test_aether/srv/mariadb/ -``` \ No newline at end of file +```