More Docker Compose work
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -80,6 +80,8 @@ logs/mailman2/
|
|||||||
tmp/
|
tmp/
|
||||||
temp/
|
temp/
|
||||||
|
|
||||||
|
# OSIT and Aether specific:
|
||||||
|
|
||||||
# srv/aether_api/
|
# srv/aether_api/
|
||||||
# srv/aether_app/
|
# srv/aether_app/
|
||||||
# srv/hosted_files/
|
# srv/hosted_files/
|
||||||
@@ -115,4 +117,7 @@ srv/hosted_files_ln
|
|||||||
srv/hosted_tmp_dev_ln/
|
srv/hosted_tmp_dev_ln/
|
||||||
srv/hosted_tmp_dev_ln
|
srv/hosted_tmp_dev_ln
|
||||||
srv/hosted_tmp_ln/
|
srv/hosted_tmp_ln/
|
||||||
srv/hosted_tmp_ln
|
srv/hosted_tmp_ln
|
||||||
|
|
||||||
|
srv/mariadb_ln/
|
||||||
|
srv/mariadb_ln
|
||||||
25
README.md
25
README.md
@@ -1,5 +1,30 @@
|
|||||||
This can be used to create a Docker server cluster for the Aether App using Flask, Aether API using FastAPI.
|
This can be used to create a Docker server cluster for the Aether App using Flask, Aether API using FastAPI.
|
||||||
|
|
||||||
|
## Initialize
|
||||||
|
### Part 1
|
||||||
|
```bash
|
||||||
|
sudo mkdir /srv/env
|
||||||
|
sudo chown -R scott:scott /srv/env/
|
||||||
|
git clone https://scott_idem@bitbucket.org/oneskyit/one-sky-it-container-environment.git /srv/env/test_aether
|
||||||
|
|
||||||
|
ln -s /srv/http/dev_app.oneskyit.com /srv/env/test_aether/srv/aether_app_ln
|
||||||
|
ln -s /srv/http/dev_fastapi.oneskyit.com /srv/env/test_aether/srv/aether_api_ln
|
||||||
|
ln -s /mnt/data/speaker_ready/hosted_tmp /srv/env/test_aether/srv/hosted_tmp_ln
|
||||||
|
ln -s /mnt/data/speaker_ready/hosted_files /srv/env/test_aether/srv/hosted_files_ln
|
||||||
|
|
||||||
|
ls -lha /srv/env/test_aether/srv/aether_app_ln/
|
||||||
|
ls -lha /srv/env/test_aether/srv/aether_api_ln/
|
||||||
|
ls -lha /srv/env/test_aether/srv/hosted_tmp_ln/
|
||||||
|
ls -lha /srv/env/test_aether/srv/hosted_files_ln/
|
||||||
|
````
|
||||||
|
|
||||||
|
### Part 2
|
||||||
|
```bash
|
||||||
|
sudo ls -lha /var/lib/mysql/
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Common:
|
## Common:
|
||||||
* conf/ = All config files
|
* conf/ = All config files
|
||||||
* logs/ = All log files
|
* logs/ = All log files
|
||||||
|
|||||||
6
conf/mariadb/password_reset.sql
Normal file
6
conf/mariadb/password_reset.sql
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
CREATE USER IF NOT EXISTS root@localhost IDENTIFIED BY '$1sky.Adapting.7e2';
|
||||||
|
SET PASSWORD FOR root@localhost = PASSWORD('$1sky.Adapting.7e2');
|
||||||
|
GRANT ALL ON *.* TO root@localhost WITH GRANT OPTION;
|
||||||
|
CREATE USER IF NOT EXISTS root@'%' IDENTIFIED BY '$1sky.Adapting.7e2';
|
||||||
|
SET PASSWORD FOR root@'%' = PASSWORD('$1sky.Adapting.7e2');
|
||||||
|
GRANT ALL ON *.* TO root@'%' WITH GRANT OPTION;
|
||||||
@@ -47,7 +47,7 @@ services:
|
|||||||
# - ./conf/nginx/site-enabled_aether_fastapi_2_gunicorn.conf:/etc/nginx/conf.d/site-enabled_aether_fastapi_2_gunicorn.conf
|
# - ./conf/nginx/site-enabled_aether_fastapi_2_gunicorn.conf:/etc/nginx/conf.d/site-enabled_aether_fastapi_2_gunicorn.conf
|
||||||
- ./conf/nginx/site-enabled_aether_flask_gunicorn.conf:/etc/nginx/conf.d/site-enabled_aether_flask_gunicorn.conf
|
- ./conf/nginx/site-enabled_aether_flask_gunicorn.conf:/etc/nginx/conf.d/site-enabled_aether_flask_gunicorn.conf
|
||||||
|
|
||||||
- ./conf/certs/oneskyit.com_fullchain.pem:/etc/certs/fullchain.pem
|
- ./conf/certs/fullchain.pem:/etc/certs/fullchain.pem
|
||||||
- ./conf/certs/privkey.pem:/etc/certs/privkey.pem
|
- ./conf/certs/privkey.pem:/etc/certs/privkey.pem
|
||||||
- ./conf/certs/ssl-dhparams.pem:/etc/certs/ssl-dhparams.pem
|
- ./conf/certs/ssl-dhparams.pem:/etc/certs/ssl-dhparams.pem
|
||||||
|
|
||||||
@@ -144,41 +144,46 @@ services:
|
|||||||
# networks:
|
# networks:
|
||||||
# - local-net
|
# - local-net
|
||||||
|
|
||||||
# phpmyadmin:
|
phpmyadmin:
|
||||||
# image: phpmyadmin
|
image: phpmyadmin
|
||||||
# container_name: ae_phpmyadmin
|
container_name: ae_phpmyadmin
|
||||||
# restart: unless-stopped
|
restart: unless-stopped
|
||||||
# depends_on:
|
depends_on:
|
||||||
# - mariadb
|
- mariadb
|
||||||
# ports:
|
ports:
|
||||||
# - 8888:80
|
- 8888:80
|
||||||
# env_file:
|
env_file:
|
||||||
# - ./.env
|
- ./.env
|
||||||
# environment:
|
environment:
|
||||||
# - PMA_ARBITRARY=1
|
- PMA_ARBITRARY=1
|
||||||
# - UPLOAD_LIMIT=1G
|
- UPLOAD_LIMIT=1G
|
||||||
|
|
||||||
# mariadb:
|
|
||||||
# container_name: ae_mariadb_dev
|
|
||||||
# image: mariadb/server:latest
|
|
||||||
# restart: always
|
|
||||||
# # image: mariadb:10.6
|
|
||||||
# # env_file:
|
|
||||||
# # - ./.env
|
|
||||||
# # - filename.env
|
|
||||||
# ports:
|
|
||||||
# - "3307:3306"
|
|
||||||
# volumes:
|
|
||||||
# - ./srv/mariadb:/var/lib/mysql
|
|
||||||
# # - ./conf/mariadb/my.cnf:/etc/my.cnf
|
|
||||||
# environment:
|
|
||||||
# - MARIADB_ROOT_PASSWORD='MyPassword.1248'
|
|
||||||
# # - MARIADB_DATABASE: 'my_env_db'
|
|
||||||
# # - MYSQL_ROOT_PASSWORD=
|
|
||||||
# - MYSQL_PASSWORD=MyPassword
|
|
||||||
# - MYSQL_DATABASE=nextcloud
|
|
||||||
# - MYSQL_USER=nextcloud
|
|
||||||
|
|
||||||
|
mariadb:
|
||||||
|
container_name: ae_mariadb_dev
|
||||||
|
# image: mariadb/server:latest
|
||||||
|
image: mariadb:10.9
|
||||||
|
# image: mariadb:10.6
|
||||||
|
restart: always
|
||||||
|
# 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:
|
# nextcloud25:
|
||||||
# container_name: ae_nextcloud25_dev
|
# container_name: ae_nextcloud25_dev
|
||||||
|
|||||||
@@ -1,23 +1,43 @@
|
|||||||
Create links to the actual file directories
|
Create links to the actual directories as needed
|
||||||
./srv/aether_api
|
* ./srv/aether_api
|
||||||
./srv/aether_app
|
* ./srv/aether_app
|
||||||
./srv/hosted_files
|
* ./srv/hosted_files
|
||||||
./srv/mariadb
|
* ./srv/mariadb
|
||||||
./srv/nextcloud
|
* ./srv/nextcloud
|
||||||
./srv/oneskyit_site
|
* ./srv/oneskyit_site
|
||||||
./srv/static_files
|
* ./srv/static_files
|
||||||
|
|
||||||
## Create links examples
|
## Create links examples
|
||||||
### Flask App
|
### Flask App
|
||||||
|
```bash
|
||||||
|
ln -s /srv/http/dev_app.oneskyit.com /srv/env/test_aether/srv/aether_app_ln
|
||||||
ln -s ~/OSIT_dev/aether_app ~/OSIT_dev/aether_container_env/srv/aether_app_ln
|
ln -s ~/OSIT_dev/aether_app ~/OSIT_dev/aether_container_env/srv/aether_app_ln
|
||||||
|
```
|
||||||
|
|
||||||
### FastAPI API
|
### FastAPI API
|
||||||
|
```bash
|
||||||
|
ln -s /srv/http/dev_fastapi.oneskyit.com /srv/env/test_aether/srv/aether_api_ln
|
||||||
ln -s ~/OSIT_dev/aether_api_fastapi ~/OSIT_dev/aether_container_env/srv/aether_api_ln
|
ln -s ~/OSIT_dev/aether_api_fastapi ~/OSIT_dev/aether_container_env/srv/aether_api_ln
|
||||||
|
```
|
||||||
|
|
||||||
### Hosted tmp files
|
### Hosted tmp files
|
||||||
|
```bash
|
||||||
|
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 /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
|
ln -s /mnt/data_drive/srv/data/osit_app/hosted_tmp_dev /home/scott/OSIT_dev/aether_container_env/srv/hosted_tmp_ln
|
||||||
|
```
|
||||||
|
|
||||||
### Hosted (hashed) files
|
### Hosted (hashed) files
|
||||||
|
```bash
|
||||||
|
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 /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
|
ln -s /mnt/data_drive/srv/data/osit_app/hosted_files_dev /home/scott/OSIT_dev/aether_container_env/srv/hosted_files_ln
|
||||||
|
```
|
||||||
|
|
||||||
|
### MariaDB
|
||||||
|
```bash
|
||||||
|
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/
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user