This commit is contained in:
2019-05-09 22:22:32 +00:00
parent db9d51b2c9
commit 7d6eb1c30c
3 changed files with 88 additions and 15 deletions

View File

@@ -24,6 +24,15 @@ TODO: Make it fucking easier to test deploy and erase db and fetch key and all t
=-=-=-=-=-=-
Less urgent things...
DEVELOPMENT STREAMLINING
- VIRTUAL DEV
- Look into dockerizing all development tools in such a way they can be pulled in to a new computer quickly and start working
- Chromebook development? (they are currently 289 bucks so that's a greatr saving)
- I envision installing docker to a computer then issuing a single command to pull in all the requirements and launch vscode, the db server you name it
- This would then mean it would be safe to have a computer stolen or travel could just pick up a new one and get to work quickly
DOCS / MANUAL
- Disable google fonts for manual / docs generator:
- first need to upgrade to latest mkdocs AND material theme for mkdocs

View File

@@ -488,21 +488,84 @@ The key is to input the size of the file in bytes so here are some common file s
1 TB = 1099511627776 bytes
10 TB =10995116277760 bytes
=-=-=-=-=-=-=-=-=-=-
DOCKER DEV
=-=-=-=-=-=-
After a reboot of dev machine the containers are stopped and need to be restarted on reboot with this command:
docker start dock-pg10 dock-pgadmin
**USE PGADMIN**
Browse to localhost 5050
Can view the status of all containers with
docker ps -a
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ICON GENERATOR
=-=-=-=-=-=-=-=-
- Used to generate pwa icons from source svg: http://cthedot.de/icongen/
- Used to generate pwa icons from source svg: http://cthedot.de/icongen/
=-=-=-=-=-=-=-=-=-=-
DOCKER POSTGRES DEVELOPMENT STATION COMMANDS AND USEFUL INFO
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
OFFICIAL DOCKER POSTGRES IMAGE
https://hub.docker.com/_/postgres/
DEV SETUP
Using two containers dock-pg10 and dock-pgadmin
Command to list them all:
docker container ls
Command to see the detailed configuration of them:
docker container inspect [CONTAINER_NAME OR ID]
They use a volume in docker called "raven"
C:\data\code\raven\tools>docker volume inspect raven
[
{
"CreatedAt": "2019-05-09T17:03:34Z",
"Driver": "local",
"Labels": {},
"Mountpoint": "/var/lib/docker/volumes/raven/_data",
"Name": "raven",
"Options": {},
"Scope": "local"
}
]
To list volumes:
docker volume ls
IMAGES
=-=-=-
dock-pg10 uses the official "postgres" docker image
dock-pgadmin uses "chorss/docker-pgadmin4"
USEFUL COMMANDS
----------------
DUMPING POSTGRES DATA OUT OF IMAGE:
docker exec dock-pg10 pg_dumpall -U postgres > dump.sql
START A PG SERVER CONTAINER:
TEMPORARILY: docker run --rm --name pg -p 5432:5432 -e POSTGRES_PASSWORD=raven -e POSTGRES_DB=AyaNova -d postgres
(this will remove it after it closes with the rm switch and the rest is the requirements for ayanova, no idea where the data goes and it won't be kept AFAIK)
FANCY WITH VOLUME: docker run --name pg11 -e POSTGRES_PASSWORD=raven -d -p 5432:5432 -v /var/lib/docker/volumes/raven/_data:/var/lib/postgresql/data postgres
STATUS:
Can view the status of all containers with
docker ps -a
PGADMIN
=-=-=-=-
Official docker hub pgadmin 4 image:
https://hub.docker.com/r/dpage/pgadmin4/
RUN IT:
docker run -p 80:80 --link pg -e "PGADMIN_DEFAULT_EMAIL=support@ayanova.com" -e "PGADMIN_DEFAULT_PASSWORD=abraxis" -d dpage/pgadmin4
Browse to the site either localhost or if a port specified then another port
Login using support@ayanova.com and abraxis
Add the server by host name of pg (this is the pg container name and also the --link parameter in the pgadmin run command)
Use the credentials specified for postgres which is username postgres and password raven (specified on command line for running pg container)

View File

@@ -1 +1,2 @@
docker start dock-pg10 dock-pgadmin
REM docker start dock-pg10 dock-pgadmin
docker run --rm --name pg -p 5432:5432 -e POSTGRES_PASSWORD=raven -e POSTGRES_DB=AyaNova -d postgres:latest