mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
only use ssl if certificate is specified
Signed-off-by: Markus Opahle <3225748+mopahle@users.noreply.github.com>
This commit is contained in:
@@ -439,7 +439,7 @@ Before starting the build process, review the [inventory](./installer/inventory)
|
|||||||
|
|
||||||
*host_port*
|
*host_port*
|
||||||
|
|
||||||
> Provide a port number that can be mapped from the Docker daemon host to the web server running inside the AWX container. Defaults to *443*.
|
> Provide a port number that can be mapped from the Docker daemon host to the web server running inside the AWX container. Defaults to *80*.
|
||||||
|
|
||||||
*ssl_certificate*
|
*ssl_certificate*
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ dockerhub_base=ansible
|
|||||||
awx_task_hostname=awx
|
awx_task_hostname=awx
|
||||||
awx_web_hostname=awxweb
|
awx_web_hostname=awxweb
|
||||||
postgres_data_dir=/tmp/pgdocker
|
postgres_data_dir=/tmp/pgdocker
|
||||||
host_port=443
|
host_port=80
|
||||||
#ssl_certificate=
|
#ssl_certificate=
|
||||||
|
|
||||||
# Docker Compose Install
|
# Docker Compose Install
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
|
|
||||||
- name: Stage nginx.conf
|
- name: Stage nginx.conf
|
||||||
template:
|
template:
|
||||||
src: nginx.conf
|
src: nginx.conf.j2
|
||||||
dest: "{{ docker_base_path }}/nginx.conf"
|
dest: "{{ docker_base_path }}/nginx.conf"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
|
|||||||
@@ -53,10 +53,6 @@ RUN rm -rf /tmp/*
|
|||||||
|
|
||||||
RUN echo "{{ awx_version }}" > /var/lib/awx/.tower_version
|
RUN echo "{{ awx_version }}" > /var/lib/awx/.tower_version
|
||||||
ADD nginx.conf /etc/nginx/nginx.conf
|
ADD nginx.conf /etc/nginx/nginx.conf
|
||||||
RUN openssl req -newkey rsa:4906 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem -subj "/CN=localhost/" && \
|
|
||||||
cat certificate.pem key.pem > /etc/nginx/awxweb.pem && \
|
|
||||||
chmod 0600 /etc/nginx/awxweb.pem && \
|
|
||||||
rm certificate.pem key.pem
|
|
||||||
ADD supervisor.conf /supervisor.conf
|
ADD supervisor.conf /supervisor.conf
|
||||||
ADD supervisor_task.conf /supervisor_task.conf
|
ADD supervisor_task.conf /supervisor_task.conf
|
||||||
ADD launch_awx.sh /usr/bin/launch_awx.sh
|
ADD launch_awx.sh /usr/bin/launch_awx.sh
|
||||||
|
|||||||
@@ -36,10 +36,14 @@ http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
{% if ssl_certificate is defined %}
|
||||||
listen 8052 ssl default_server;
|
listen 8052 ssl default_server;
|
||||||
|
|
||||||
ssl_certificate /etc/nginx/awxweb.pem;
|
ssl_certificate /etc/nginx/awxweb.pem;
|
||||||
ssl_certificate_key /etc/nginx/awxweb.pem;
|
ssl_certificate_key /etc/nginx/awxweb.pem;
|
||||||
|
{% else %}
|
||||||
|
listen 8052 default_server;
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# If you have a domain name, this is where to add it
|
# If you have a domain name, this is where to add it
|
||||||
server_name _;
|
server_name _;
|
||||||
Reference in New Issue
Block a user