I am deploying a NodeJS app with Docker and Travis CI into AWS Elastic Beanstalk. My NodeJS app is dependent on MONGO_URI which I wish to pass as an environment variable. I tried adding it via the environmental properties but it doesn't seems to work.
Related
How can I pass custom environment variables to NestJS application running on PM2 in Elastic Beanstalk without adding them in EB environment?
I was getting this error in webstdout.log from Elastic Beanstalk logs
Error: ENV_VAR env variable must be set before server is started
I have an application I want to deploy as a Docker container using Amazons Beanstalk platform. However the application is only certified against v17 of Docker, but Beanstalk uses v18 of Docker.
Is there a way of configuring Beanstalk to use a specific version of Docker? I cannot find any options to do this when I create my application within the AWS console (I have signed up for a free account so maybe such an option is for paid versions).
I am very much new to aws. I have created an environment in elastic beanstalk and deployed my application there using zipped code. The application is up and running now. Now i want to stop and start my elastic beanstalk instance from cli in windows. I could not find any stop button in the aws elastic beanstalk console.
I have installed awsebcli using below command:
pip install awsebcli
Now, i want to connect to my existing environment in elastic beanstalk and stop or start the environment at my will.
How can i do that?
The way the EBCLI (awsebcli) works is that you associate an empty directory on your computer with an EB application.
go to an empty directory
eb init --region <region name>. When prompted for the application name, choose the application you created previously.
eb terminate <environment name>. This will terminate the environment.
To create a new environment, perform eb create.
Currently I have setup my yii2 website on AWS Elastic beanstalk. I followed following steps :
Created Elastic Beanstalk app and environment : Platform PHP 7.0, RDS database
Created SSH connection from EC2 instance of elastic beanstalk using putty with .pem file
In Apache folder I have cloned my yii2 git repo using (sudo git clone repo_url) command
Installed composer using this link https://gist.github.com/asugai/6694502
Run command : (sudo composer install) in my repo folder
Edited common/config/main-local.php and made db connection
And run migration using (sudo php yii migrate)
Setup a domain for this elastic beanstalk app
Now I don't know how should I proceed further and I am facing following problems :
Elastic Balance loader is creating new instance and terminating current one when it fails or health goes in severe.
Due this, my all data in that instance is lost. To make it work I am doing all steps again and again manually.
How can I make my domain https (SSL certified)
How can make easy process to pull new changes from git
I already have a working site in nodeJS. which is using elastic beanstalk, elastic balance loader, RDS(postgres), S3 bucket, cloudfront for Route 53, SSL certificate (https), code pipeline, code commit. And AWSCLI at local to deploy nodeJS app.
my question is about I want to use same flow for yii2 advance app.
Can anyone please help me here?
Thanks in advance :)
I just "Dockerized" my infrastructure into containers. The environment basically is one nginx-php-fpm container which contains nginx configured with php-fpm. This container connects to multiple data-containers which contains the application files for the specific component.
I've seen multiple talks on deploying a single container to Beanstalk, but I'm not sure how I would deploy an environment like this. Locally the environment works. I got my nginx-php-fpm container using the --volumes-from flag to a data-container.
How would I create the same environment on Beanstalk? I can't find the option to volume from another container. Also is there a good platform that handles the Docker orchestration yet?
AWS allows you to use multicontainer docker.
You can use docker-compose to help you to create your nginx-php-fpm environment.