Nginx Configuration Not Being Overridden

0

I have a Beanstalk environment running

Docker running on 64bit Amazon Linux 2023/4.2.1

And my application directory looks like:

~/app/
`-- .platform/
    |-- nginx/ 
    |   |-- nginx.conf    # My custom Nginx conf
...

When I ssh into the ec2 instance and look at /etc/nginx/nginx.conf, the default configuration still exists. I see that in /var/log/eb-engine.log, there is a command that copies the Nginx config

[INFO] Running command /bin/sh -c cp -rp /var/app/staging/.platform/nginx/. /var/proxy/staging/nginx

But I don't see any commands copying that config file to /etc/nginx/ Do I need to create a container in my docker-compose file with nginx or am I setting up the nginx configuration incorrectly? If I manually overwrite the nginx config in /etc/nginx/ and restart nginx, everything works correctly, but this seems like the incorrect method to solve this issue. Using a post deploy hook would be another option, but also just as hacky.

Leo
asked 2 months ago114 views
1 Answer
1
Accepted Answer

Looks like I didn't read the documentation closely enough.

Nginx defaults to none when using docker-compose. https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker.container.console.html#docker-software-config.container

Leo
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions