Deploying Kong with Postgres db in Azure App service - docker-compose

I want to deploy Kong with DB mode on the Azure App Service using the docker-compose file.
I have the following docker-compose.yml file:
https://github.com/saurabhmasc/kong-compose/blob/main/docker-compose.yml
This file is running properly in Doker Desktop.
But when I tried to run it in Azure app services it was not running.
Please gives us suggestions.
Thanks
Saurabh

Related

How to run docker-compose on google cloud run?

I'm new to GCP, and I'm trying to deploy my spring boot web service using docker-compose.
In my docker-compose.yml file, I have 3 services: my app service, mysql service and Cassandra service.
Locally, It works like a charm. I added also a cloudbuild.yaml file :
steps:
- name: 'docker/compose:1.28.2'
args: ['up', '-d']
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'workspace_app:latest', 'gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA']
images: ['gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA']
The build on Google cloud build is made with success. But, when I try to run the image on google cloud run, It doesn't call the docker-compose.
How do I must process to use docker-compose on production?
With Cloud Run, you can deploy only one container image. The container can contain several binaries that you can run in parallel. But keep that in mind:
CPU is throttled when no request are processed. Background process/app aren't recommended on Cloud Run, prefer Request/Response app on Cloud Run (a webserver).
Only HTTP request are supported by Cloud Run. TCP connection (such as MySQL connection) aren't supported.
Cloud Run is stateless. You can't persist data in it.
All the data are stored in memory (directory /tmp is writable). You can exceed the total size of the instance memory (your app footprint + your files stored in memory)
Related to the previous point, when the instance is offloaded (you don't manage that, it's serverless), you lost all what you put in memory.
Thus, MySQL and Cassandra service must be hosted elsewhere
docker-compose -f dirfile/ cloudbuild.yaml up
and for check it write this command
docker images
and for check you conatiner
docker container ls -a
and for check if container run or not write this command
docker ps
Finally, I deployed my solution with docker-compose on the google virtual machine instance.
First, we must clone our git repository on our virtual machine instance.
Then, on the cloned repository containing of course the docker-compose.yml, the dockerfile and the war file, we executed this command:
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$PWD:$PWD" \
-w="$PWD" \
docker/compose:1.29.1 up
And, voila, our solution is working on production with docker-compose

Docker file for mongo db

I created an RDS DB server for Mongo-DB,
which is attached to a web app, I created a Docker file for the respective Docker image & successfully deployed it in Kubernetes Pods.
Now I want to create the Docker image for this MongoDb,
Can any help me how to create a docker file to install Mongo DB & deploy my RDS server in it
Thanks in advance
There is no need to create private image for MongoDB, unless you need very specific settings.
Get the one from Docker Hub. This is the link to the official image

Run a self-hosted agent in Docker

I am trying to run a self- hosted agent in docker, I have created the dockerfile and start.ps1 files and installed the Azure DevOps Server Express Admin console. I am getting a "Basic authentication requires a secure connection to the server " when I try running the container in docker ( switched windows containers) URL: http://computername/DefaultCollection
I have also attached a screenshot of the error
can you please advise how to resolve this issue.
Docker Run error
thanks
Run a self-hosted agent in Docker
I could not reproduce this issue on my side with hosted agent windows-2019.
To test this issue, I created a folder dockeragent in my Azure repo, which including the files Dockerfile and start.ps1:
Then copy the content from the document Run a self-hosted agent in Docker to those two files.
Next, create a pipeline with an inline powershell task to create the docker image and run docker container:
cd $(System.DefaultWorkingDirectory)\dockeragent
docker build -t dockeragent:latest .
docker run -e AZP_URL=https://dev.azure.com/<YourOrganizationName> -e AZP_TOKEN=<YourPAT> -e AZP_AGENT_NAME=mydockeragent dockeragent:latest
The test result:
To make it work, please make sure the file Dockerfile and start.ps1 is correct without any change.
If above info not help you, please share the content of your Dockerfile and the steps you did.
Your are using azureDevOps without https.
Registering your PiplineAgent via PAT requires https (hence the error: "Basic authentication requires a secure connection to the server".
Try using other authentication Methoden (negotiation, which uses windows authentication)

How can I deploy a Flask website with MongoDB to Google Cloud Platform?

I'm using Flask as my backend and MongoDB for storing the data. I've connected my Website to MongoDB Atlas and tested everything locally and it works as expected. But when I try deploying the website to Google Cloud Platform (GCP) MongoDB doesn't work at all. The only configuration file that I have is app.yaml and it looks like this:
runtime: python
env: flex
entrypoint: gunicorn -b :$PORT main:app
runtime_config:
python_version: 3
handlers:
- url: /static
static_dir: static
- url: /.*
script: auto
I have connected my project to an Instance and enabled API Engine. For deployment, I simply ran the following command in Cloud Shell
gcloud app deploy
Do I need any other configuration files to run MongoDB? Or is the whole process wrong and I need to do it in another way.

How to use cloud code on parse server with bitnami and AWS

I recently migrate my parse.com app to from parse servers to amazon AWS using bitnami parse server and mLab.
The migration works OK and the only problem i'm having is with the cloud code.
I edit the main.js located in /bitnami/apps/parse/htdocs/spec/cloud
but i don't know how to deploy the file.
how do i update the cloud code file after editing?
I tried: forever stop 0
forever start server.js, but it didn't work.
thanks in advance.
Check out the Bitnami Parse Server documentation:
https://wiki.bitnami.com/Applications/Bitnami_Parse_Server#How_to_start.2fstop_the_servers.3f
After making changes to main.js just run
sudo /opt/bitnami/ctlscript.sh restart parse
to restart the Parse server.