Port Mapping
If you'd like to be able to access the instance from the host without the container's IP, standard port mappings can be used. Just add -p 3000:3000 to the docker run arguments and then access either localhost:3000 or host-ip:3000 in a browser.
whoami:
image: jwilder/whoami
environment:
- VIRTUAL_HOST=whoami.local
-v /my/own/datadir:/var/lib/mysql
CREATE DATABASE mydb;
CREATE USER 'readuser'@'%' IDENTIFIED BY 'passwordforreaduser';
GRANT SELECT ON mydb.* TO 'readuser'@'%';
CREATE USER 'writeuser'@'%' IDENTIFIED BY 'passwordforwriteuser';
GRANT INSERT, UPDATE, SELECT, DELETE ON mydb.* TO 'writeuser'@'%';
devilbox-php.ini-xdebug
This file holds some sane example configuration to get you started with Xdebug. Copy it (do not simply rename it) to a different file ending by .ini and start adjusting it.
---
version: '2.4'
services:
portainer:
image: portainer/portainer
container_name: portainer
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /path/to/data:/data
ports:
- 8000:8000
- 9000:9000
networks:
vlan:
ipv4_address: 192.168.0.60
networks:
dockervlan:
#This interface should be defined as using null driver. Do not remove it.
driver: null
driver_opts:
parent: eth0
ipam:
config:
- subnet: "192.168.0.0/24"
ip_range: "192.168.0.64/26"
gateway: "192.168.0.1"
dockervlan:
#This is the interface which is used for containers networking
driver: macvlan
driver_opts:
parent: eth0
ipam:
config:
- subnet: "192.168.0.0/24"
ip_range: "192.168.0.64/26"
gateway: "192.168.0.1"
services:
proxy:
image: jwilder/nginx-proxy
ports:
- 0.0.0.0:80:80
- 0.0.0.0:443:443
volumes:
- /var/run/docker.sock:/tmp/docker.sock
- ./certs/:/etc/nginx/certs:ro
- ./jira-nginx.conf:/etc/nginx/vhost.d/jira.local.net
networks:
proxy:
aliases:
- "site.local.net"