Created
February 23, 2021 18:40
-
-
Save alexandervantrijffel/d5e6a7d42fa26fbd73f2f3d36ee416d1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allow traffic from docker container to mysql on host | |
### docker-compose | |
wordpress: | |
image: wordpress | |
restart: always | |
ports: | |
- 39260:80 | |
environment: | |
WORDPRESS_DB_HOST: host.url.com | |
networks: | |
- my_bridge | |
networks: | |
my_bridge: | |
driver: bridge | |
driver_opts: | |
com.docker.network.bridge.name: my-bridge | |
O | |
### configure ufw | |
# mysql | |
ufw allow in on my-bridge from any to any port 3306 | |
# | |
ufw allow in on bezorgzorg-bridge from any to any port 5432 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment