Hi, @revant_one and community,
I am not able to expose multiple hosts from multiple docker containers (using the same but with different ports docker-compose file) in a particular EC2 instance in the development setup.
Note: Both created containers are accesses by different Linux users, so I am using the same docker-compose file, but only ports changed [difference mentioned below].
Getting errors that ports are already in use.
System Specs:-
Ubuntu 18.04 LTS machine over EC2 instance
I am using frappe/bench: latest for container build. Take a look at the docker-compose.yml file.
version: "3.7"
services:
mariadb:
image: mariadb:10.3
environment:
- MYSQL_ROOT_PASSWORD=123
- MYSQL_USER=root
volumes:
- ./installation/frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf
- mariadb-vol:/var/lib/mysql
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci', '--skip-character-set-client-handshake']
redis-cache:
image: redis:alpine
redis-queue:
image: redis:alpine`Preformatted text`
redis-socketio:
image: redis:alpine
frappe:
image: frappe/bench:latest
command: sleep infinity
volumes:
- ..:/workspace:cached
working_dir: /workspace/development
ports:
- "8000:8000"
- "9000:9000"
- "6379:6379"
volumes:
mariadb-vol:
postgresql-vol:
and 2nd docker-compose.yml file only difference is
ports:
- "8001:8001"
- "9001:9001"
- "6390:6390"
External hosts -
1st - <host_name>: 8000
2nd - <host_name>: 8001
Only one out of multiple (here two) hosts able to access.
Please also suggest any approach to run it. (Can be an alternative approach to it)
Thanks
Vijendra