Sign inSign up

raychorn/ubuntu_python_mongo

By raychorn

Updated almost 6 years ago

Image
0

32

raychorn/ubuntu_python_mongo repository overview

Ubuntu 18.04 + Python 2.7.x / 3.6.x / 3.8.x / 3.9.x + mongodb 4.4.1 + node.js (latest) + npm (latest) + ng (latest) # node.js or npm will be lts or latest.

The following bash script is what you may use (with some changes, obviously) to get your environment up and running:

#!/bin/bash

if [ -f "/usr/bin/python" ]; then unlink /usr/bin/python; fi ln -s /usr/local/bin/python3.8 /usr/bin/python if [ -f "/usr/bin/pip" ]; then unlink /usr/bin/pip; fi ln -s /usr/local/bin/pip3.8 /usr/bin/pip if [ -f "/usr/bin/pip3" ]; then unlink /usr/bin/pip3; fi ln -s /usr/local/bin/pip3.8 /usr/bin/pip3

apt-get install systemd -echo -y --fix-missing apt-get install strace -y

export TZ=US/Mountain ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

obviously you have to supply the init.d but that's life in the big city.

if [ -f "./init.d/mongod" ]; then if [ -f "/etc/init.d/mongod" ]; then rm -f /etc/init.d/mongod; fi cp ./init.d/mongod /etc/init.d/mongod fi chmod +x /etc/init.d/mongod service mongod start

obviously you have to supply the conf but that's life in the big city.

if [ -f "./init.d/mongod.conf" ]; then if [ -f "/etc/mongod.conf" ]; then rm -f /etc/mongod.conf; fi cp ./init.d/mongod.conf /etc/mongod.conf fi

service mongod restart mongo --eval 'db.runCommand({ connectionStatus: 1 })'

mongo < ./init.d/create-admin-user.js # obviously you have to supply the script.

service mongod stop python ./init.d/mongo_auth_enable.py # obviously you have to supply the script because obviously auth is not enabled by default. service mongod start

Tag summary

Content type

Image

Digest

Size

897.4 MB

Last updated

almost 6 years ago

docker pull raychorn/ubuntu_python_mongo:ng