Get docker-compose file here : https://github.com/VaradBelwalkar/Compute-Services
296
Major change: Now entirely based on golang and more secure, Visit https://github.com/VaradBelwalkar/Compute-Services, to get docker-compose and build your own private cloud
Get the client for windows and Linux from the GitHub
A typical docker-compose file:
version: '3.9'
services:
golang_server:
image: varadbelwalkar/golang_server
container_name: golang_server
ports:
- 8080:8000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./config.json:/app/config.json
- ./.env:/app/.env
depends_on:
- mongo
- redis
redis:
image: redis
container_name: redis
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
mongo:
image: mongo
container_name: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: <admin_useraname>
MONGO_INITDB_ROOT_PASSWORD: <admin_password>
MONGO_INITDB_DATABASE: private_cloud
volumes:
- mndbdatabase:/data/db
volumes:
mndbdatabase:
Typical Config.json file:
{
"emails":[
"[email protected]",
"[email protected]"
],
"database":{
"name":"private_cloud",
"collections":[
"user_details",
"system_details"
]
},
"images":[
"check_ubuntu",
"ubuntu",
"nodejs",
"cpp",
"python",
"java",
"golang",
"nested-docker",
"machine-learning"
],
"server_port":"8000"
}
Typical .env file:
MONGODB_URI=""
REDIS_URL=""
REDIS_PASSWORD=""
JWT_SECRET=""
PASSWORD_HASH_SECRET=""
OFFICIAL_EMAIL=""
OFFICIAL_EMAIL_APP_PASSWORD=""
Typical redis.conf file:
requirepass sample
Content type
Image
Digest
sha256:76cdf9be6…
Size
68.8 MB
Last updated
almost 3 years ago
docker pull varadbelwalkar/golang_server