Gitea to listen only on host ports so as to expose ports outside only using the reverse proxy

This commit is contained in:
tanshu 2020-05-04 17:05:43 +05:30
parent 5cda2c5eff
commit e8ef0b252f
3 changed files with 5 additions and 6 deletions

View File

@ -42,7 +42,7 @@
links: links:
- "postgres:db" - "postgres:db"
published_ports: published_ports:
- "3000:3000" - "127.0.0.1:3000:3000"
- "127.0.0.1:2222:22" - "127.0.0.1:2222:22"
volumes: volumes:
- /var/lib/gitea:/data - /var/lib/gitea:/data

View File

@ -34,7 +34,7 @@
USER_UID: "{{ getent_passwd[user][1] }}" USER_UID: "{{ getent_passwd[user][1] }}"
USER_GID: "{{ getent_passwd[user][2] }}" USER_GID: "{{ getent_passwd[user][2] }}"
published_ports: published_ports:
- "3000:3000" - "127.0.0.1:3000:3000"
- "127.0.0.1:2222:22" - "127.0.0.1:2222:22"
volumes: volumes:
- /var/lib/gitea:/data - /var/lib/gitea:/data

View File

@ -1,7 +1,6 @@
# Docker on Ubuntu 18.04 # Gitea on Ubuntu
This playbook will install Docker an Ubuntu 18.04 machine, as explained in the guide on This playbook will install Gitea on an Ubuntu 19.10 machine.
[How to Use Ansible to Install and Set Up Docker on Ubuntu 18.04](https://www.digitalocean.com/community/tutorials/how-to-use-ansible-to-install-and-set-up-docker-on-ubuntu-18-04).
A number of containers will be created with the options specified in the `vars/default.yml` variable file. A number of containers will be created with the options specified in the `vars/default.yml` variable file.
## Settings ## Settings
@ -43,4 +42,4 @@ default_container_command: sleep 1d
ansible-playbook -l [target] -i [inventory file] -u [remote user] playbook.yml ansible-playbook -l [target] -i [inventory file] -u [remote user] playbook.yml
``` ```
For more information on how to run this Ansible setup, please check this guide: [How to Use Ansible to Install and Set Up Docker on Ubuntu 18.04](https://www.digitalocean.com/community/tutorials/how-to-use-ansible-to-install-and-set-up-docker-on-ubuntu-18-04). For more information on how to run this Ansible setup, please check this guide: [How to Use Ansible to Install and Set Up Docker on Ubuntu 18.04](https://www.digitalocean.com/community/tutorials/how-to-use-ansible-to-install-and-set-up-docker-on-ubuntu-18-04).