Commit be254a79 authored by Mark Harding's avatar Mark Harding
Browse files

(chore): updates docs

parent 2fe2ac7b
......@@ -3,6 +3,7 @@ Minds
Minds is an open-source, encrypted and reward-based social networking platform. https://minds.com
## Repositories
Minds is split into multiple repositories:
- [Engine](https://github.com/Minds/engine) - Backend code & APIs
......@@ -11,30 +12,38 @@ Minds is split into multiple repositories:
- [Mobile](https://github.com/Minds/mobile-native) - React Native mobile apps
## Documentation
## Development System Requirements
- > 10GB RAM
- > 100GB Disk space
- [Docker Compose](https://docs.docker.com/compose/)
## Development Installation
1. Run `sh init.sh` in order to install the front and engine repositories
2. Run `docker-compose up -d nginx`
3. Run `docker-compose exec cassandra nodetool enablethrift`
4. Run `docker-compose up installer` (one time only.. initial username: minds / password: password)
5. Run `docker-compose up front-build`
6. Navigate to `http://localhost:8080`
### Troubleshooting
- Minds is already installed
- Ensure engine/settings.php does not exist and re-run `docker-compose up installer`
The below do
- Cassandra will not boot
- Ensure thrift is enabled
- Cassandra requires at least 4GB of memory to operate. You can start Cassandra manually by running `docker-compose up cassandra`
Documentation for Minds can be found at [minds.org/docs](https://www.minds.org/docs)
1. [Installation](https://www.minds.org/docs/install.html)
1. [Requirements](https://www.minds.org/docs/install/requirements.html)
2. [Download](https://www.minds.org/docs/install/download.html)
3. [Vagrant Development Environment](https://www.minds.org/docs/install/vagrant.html)
4. [Install & Build](https://www.minds.org/docs/install/preparation.html)
1. [Front End](https://www.minds.org/docs/install/preparation.html#front-end)
2. [Engine](https://www.minds.org/docs/install/preparation.html#engine-php)
3. [Install Script](https://www.minds.org/docs/install/installation.html)
5. [Troubleshooting](https://www.minds.org/docs/install/troubleshooting.html)
2. [Testing](https://www.minds.org/docs/testing.html)
3. [Contributing](https://www.minds.org/docs/contributing.html)
## Production System Requirements
## Docker setup
At this time it is not advisable to run Minds in production, however it is possible so long as you are aware of the risks.
The Docker environment is currently a work in progress and we intend on streamlining the installation phase.
- 3 Cassandra Nodes (Min 30gb RAM, 1TB SSD, 8 CPU)
- 1 ElasticSearch Node (Min 16GB RAM, 250GB SSD, 8 CPU) #2 nodes are recommended for failover
- 1 Docker Machine (Min 60gb RAM, 50GB SSD, 32 CPU)
1. Run `docker ps` and look for the minds_php-fpm container
2. Run `docker exec -it CONTAINER_ID_HERE php /var/www/Minds/engine/cli.php install keys`
3. Run `docker exec -it CONTAINER_ID_HERE php /var/www/Minds/engine/cli.php install --graceful-storage-provision --domain=dev.minds.io --username=minds --password=password --email=minds@dev.minds.io --private-key=/.dev/minds.pem --public-key=/.dev/minds.pub --cassandra-server=cassandra`
## Contributing
If you'd like to contribute to the Minds project, check out the [Contribution](https://www.minds.org/docs/contributing.html) section of Minds.org or head right over to the [Minds Open Source Community](https://www.minds.com/groups/profile/365903183068794880). If you've found or fixed a bug, let us know in the [Minds Help and Support Group](https://www.minds.com/groups/profile/100000000000000681/activity)!
......
FROM nginx:1.13-alpine
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/nginx.conf
COPY ./dev.conf /etc/nginx/conf.d/dev.conf
server {
listen 80;
listen [::]:80 default ipv6only=on;
root /var/www/Minds/front/dist;
index index.php index.html;
server_name _;
error_log /dev/stdout warn;
access_log off;
if ($host = 'minds.com' ) {
rewrite ^/(.*)$ https://www.minds.com/$1 permanent;
}
#if ($http_x_forwarded_proto != "https") {
# rewrite ^(.*)$ https://$host$REQUEST_URI permanent;
#}
sendfile off;
location / {
try_files $uri $uri/ @rewrite;
port_in_redirect off;
}
location ~ ^(/api|/fs|/icon|/carousel) {
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With,X-No-Cache';
rewrite ^(.+)$ /index.php last;
}
location ~* \.(png|jpg|jpeg|gif|ico|js|css)$ {
expires 1y;
log_not_found off;
}
location ~ (.woff|.tff) {
add_header 'Access-Control-Allow-Origin' *;
}
location ~ (composer.json|composer.lock|.travis.yml){
deny all;
}
location @rewrite {
rewrite ^(.+)$ /index.php last;
}
# Do not cache by default
set $no_cache 1;
# Cache GET requests by default
if ($request_method = GET){
set $no_cache 0;
}
# Do not cache if we have a cookie set
if ($http_cookie ~ "(mindsperm)" ){
set $no_cache 1;
}
# Do not cache if we have a logged in cookie
if ($cookie_loggedin = "1") {
set $no_cache 1;
}
# pass the PHP scripts to FastCGI server listening on socket
location ~ \.php$ {
add_header X-Cache $upstream_cache_status;
add_header No-Cache $no_cache;
add_header X-No-Cache $no_cache;
fastcgi_cache fastcgicache;
fastcgi_cache_bypass $no_cache;
fastcgi_no_cache $no_cache;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
fastcgi_buffers 64 32k;
fastcgi_buffer_size 64k;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/Minds/engine/index.php;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
expires 5d;
}
location ~ /\. {
log_not_found off;
deny all;
}
}
\ No newline at end of file
......@@ -8,8 +8,9 @@ services:
- CASSANDRA_START_RPC=true
networks:
- app
mem_limit: 4048MB
volumes:
- "./cassandra:/var/lib/cassandra"
- "./cassandra:/var/lib/cassandra:cached"
- "./logs:/var/log"
mongo:
......@@ -44,6 +45,7 @@ services:
build:
context: ./engine
dockerfile: ./containers/php-fpm/Dockerfile
mem_limit: 2048MB
depends_on:
- cassandra
#- mongo
......@@ -54,11 +56,11 @@ services:
- app
volumes:
## The following is for development environments only. Comment out on production. ##
- "./front/:/var/www/Minds/front"
- "./plugins/:/var/www/Minds/plugins"
- "./languages/:/var/www/Minds/languages"
- "./front/:/var/www/Minds/front:cached"
- "./plugins/:/var/www/Minds/plugins:cached"
- "./languages/:/var/www/Minds/languages:cached"
## The following is for development environments only. Comment out on production. ##
- "./engine/:/var/www/Minds/engine"
- "./engine/:/var/www/Minds/engine:cached"
runners:
build:
......@@ -73,7 +75,7 @@ services:
networks:
- app
volumes:
- "./front/:/var/www/Minds/front"
- "./front/:/var/www/Minds/front:cached"
- "./plugins/:/var/www/Minds/plugins"
- "./languages/:/var/www/Minds/languages"
- "./engine/:/var/www/Minds/engine"
......@@ -81,6 +83,8 @@ services:
nginx:
build:
context: ./containers/nginx
dockerfile: ./containers/nginx/Dockerfile.dev
mem_limit: 512MB
depends_on:
- php-fpm
ports:
......@@ -89,16 +93,28 @@ services:
- app
volumes:
## The following is for development environments only. Comment out on production. ##
- "./front/:/var/www/Minds/front"
- "./front/:/var/www/Minds/front:cached"
installer:
build:
context: ./engine
dockerfile: ./containers/installer/Dockerfile
depends_on:
- nginx #this will then load in everything else
networks:
- app
volumes:
- "./engine/:/var/www/Minds/engine"
- "./front/:/var/www/Minds/front"
front-build:
image: markharding/minds-front-base
networks:
- app
entrypoint:
- sh
- -c
- "cd /var/www/Minds/front && npm install && npm rebuild node-sass && npm run build-dev"
volumes:
- "./front/:/var/www/Minds/front"
networks:
app:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment