First, find the container that runs your MongoDB and ssh into it.
Then, find the collection you want to export:
mongo
show dbs
use <database>
show collections
exit
Batman/Superman #1 (2013) | |
Batman/Superman #2 | |
Batman/Superman #3 | |
Batman/Superman #4 | |
Swamp Thing Vol. 5 #0 | |
Aquaman Vol. 7 #0 | |
Nightwing Vol. 3 #0 | |
Action Comics Vol. 2 #1 (2011) | |
Action Comics Vol. 2 #2 | |
Action Comics Vol. 2 #3 |
Dial H #0 | |
Demon Knights #0 | |
Demon Knights #1 (2011) | |
Demon Knights #2 | |
Demon Knights #3 | |
Demon Knights #4 | |
Demon Knights #5 | |
Demon Knights #6 | |
Demon Knights #7 | |
Demon Knights #8 |
#!/bin/sh | |
curl https://get.docker.com | sh | |
sudo curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
sudo usermod -aG docker $USER | |
echo "****************" | |
echo "* Docker and docker-compose have been installed" | |
echo "* The current user has been added to the docker group" | |
echo "* Close and restart this session or run 'su - $USER' to refresh your active groups" | |
echo "****************" |
First, find the container that runs your MongoDB and ssh into it.
Then, find the collection you want to export:
mongo
show dbs
use <database>
show collections
exit
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
version: '2' | |
services: | |
nginx: | |
image: nginx:alpine | |
restart: always | |
labels: | |
- "traefik.enable=true" | |
- 'traefik.frontend.rule=Host:www.website.com' | |
- "traefik.port=80" | |
volumes: |
{ | |
"arrowParens": "always", | |
"printWidth": 140, | |
"tabWidth": 2, | |
"singleQuote": true, | |
"trailingComma": "es5", | |
"bracketSpacing": true, | |
"semi": true, | |
"useTabs": false | |
} |
version: "3" | |
services: | |
app: | |
build: . | |
container_name: planetpegasus-autobirther-app | |
depends_on: | |
- redis | |
links: | |
- redis | |
environment: |
FROM node:8.15-alpine | |
WORKDIR /usr/src/app | |
ENV PATH /usr/src/app/node_modules/.bin:$PATH | |
COPY package* /usr/src/app/ | |
RUN npm install | |
RUN npm install react-scripts | |
COPY . . | |
CMD ["npm", "start"] | |
EXPOSE 3000 |