#mysq_docker
#strapi_docker
#strapi_docker
version: "3.7"
services:
admin:
build:
context: .
dockerfile: ./Dockerfile
image: biznesrivoj-strapi:latest
restart: always
ports:
- "1337:1337"
depends_on:
- mysql
volumes:
- .:/srv/app
- ./public:/usr/src/app/public
- data:/usr/src/app/db
env_file: .env
environment:
DATABASE_CLIENT: mysql
DATABASE_HOST: mysql
DATABASE_PORT: 3306
DATABASE_NAME: biznesrivoj
DATABASE_USERNAME: strapi
DATABASE_PASSWORD: strapi
DATABASE_SSL: 'false'
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: 'biznesrivoj'
# So you don't have to use root, but you can if you like
MYSQL_USER: 'strapi'
# You can use whatever password you like
MYSQL_PASSWORD: 'strapi'
# Password for root access
MYSQL_ROOT_PASSWORD: 'strapi'
ports:
# <Port exposed> : < MySQL Port running inside container>
- '3306:3306'
expose:
# Opens port 3306 on the container
- '3306'
# Where our data will be persisted
volumes:
- my-db:/var/lib/mysql
volumes:
data:
my-db:
#docker_registry
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-private-docker-registry-on-ubuntu-20-04
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-private-docker-registry-on-ubuntu-20-04
Digitalocean
How To Set Up a Private Docker Registry on Ubuntu | DigitalOcean
Learn how to set up a private Docker registry on Ubuntu. Configure authentication, TLS, and persistent storage for secure image hosting.
Udemy_Node_js,_Express,_MongoDB_&_More_The_Complete_Bootcamp_2021.torrent
261.8 KB
Jonasschmedtman Udemy Course
#course
#course
NodeCommunity
https://chartio.com/learn/databases/how-does-indexing-work/ #indexing #database
Advantages
* Speed up SELECT query
* Helps to make a row unique or without duplicates(primary,unique)
* If index is set to fill-text index, then we can search against large string values. for example to find a word from a sentence etc.
Disadvantages* Indexes take additional disk space.
* indexes slow down INSERT,UPDATE and DELETE, but will speed up UPDATE if the WHERE condition has an indexed field. INSERT, UPDATE and DELETE becomes slower because on each operation the indexes must also be updated.#js_generators
Iterate over object values and do calculation
Iterate over object values and do calculation
function * iter(obj) {
for (let [key, value] of Object.entries(obj)) {
if (Object(value) !== value) yield [obj, key, value];
else yield * iter(value);
}
}
// demo
const myObject = {
base: {
serving: {
size: 100
}
},
fat: {
acids: {
monoUnsaturatedFattyAcids: 12,
polyUnsaturatedFattyAcids: 'hello',
saturatedFattyAcids: [1, 2]
},
}
};
for (let [obj, key, value] of iter(myObject)) {
if (typeof value === "number") obj[key] *= 0.5; // multiply by 0.5
}
// The object has been mutated accordingly
console.log(myObject);How to solve
Here we go:
https://robinwinslow.uk/fix-docker-networking-dns
#docker #npm
npm i error thike this on dokcer?Here we go:
https://robinwinslow.uk/fix-docker-networking-dns
#docker #npm