Closed yarafie closed 2 years ago
There are a few ways. Example using docker-compose:
version: "2.1"
services:
xteve1:
image: senexcrenshaw/xteve:latest
container_name: xteve
environment:
- TZ=America/New_York
volumes:
- /opt/configs/xteve1/config:/home/xteve/conf
- /tmp/xteve1:/tmp/xteve:rw
ports:
- 34400:34400
restart: unless-stopped
xteve2:
image: senexcrenshaw/xteve:latest
container_name: xteve
environment:
- TZ=America/New_York
volumes:
- /opt/configs/xteve2/config:/home/xteve/conf
- /tmp/xteve2:/tmp/xteve:rw
ports:
- 34401:34400
restart: unless-stopped
Thanks
not an expert in Docker or Compose
but Could i do something like the below to even change the internal port that the container uses?
version: "2.1" services: xteve-34400: image: senexcrenshaw/xteve:latest container_name: xteve-34400 environment:
34400:34400 restart: unless-stopped
xteve-34401: image: senexcrenshaw/xteve:latest container_name: xteve-34401 environment:
Also not an expert in git so pardon the incorrect indentation :)
You dont have to worry about the internal port.
ports:
- 34400:34400
This exposes 34400 on your docker host to point to 34400 in the container
ports:
- 34401:34400
This exposes 34401 on your docker host to point to 34400 in the container
Leave the container as is and just map it on the host side.
- XTEVE_PORT=34400
is not used
Thanks
I actually have both containers running behind a reverse proxy and through a wireguard VPN. Got it working using different ports perfectly.
Thank you for all suggestions it helped me in creating the docker_compose.yml
Excellent!
Is your feature request related to a problem? Please describe. How can I modify the docker_file.yml to run 2 different containers with 2 different ports and config directory?
Describe the solution you'd like Would like an example of 2 differnt yml files
Describe alternatives you've considered N/A
Additional context N/A