Skip to content

Dockerized - #6

Open
y4my4my4m wants to merge 2 commits into
rickparrish:masterfrom
y4my4my4m:master
Open

Dockerized#6
y4my4my4m wants to merge 2 commits into
rickparrish:masterfrom
y4my4my4m:master

Conversation

@y4my4my4m

Copy link
Copy Markdown

Docker

You can also run fTelnetProxy in a Docker container. The Dockerfile is included in the repository.
Recommended approach is to use the docker composer file to build and run the container.

Simply launch it using docker compose up -d --build, you can inspect the logs using docker compose logs -f

On first run, the container will create a default fTelnetProxy.ini file in the /app/bin/Release directory.
Modify it to your need.

You then use nginx (or apache) to proxy the connection to the container.
Included is a ReverseProxySample.conf file, which assumes fteplnetproxy is routing on port 4101.

You should have the index.html in /var/www/myproxy/index.html and the ReverseProxySample.conf in /etc/nginx/sites-available/myproxy.conf

Then you can enable the site with sudo ln -s /etc/nginx/sites-available/myproxy.conf /etc/nginx/sites-enabled/myproxy.conf

And reload nginx (or apache) with sudo nginx -s reload

You can now access your website on port 443 and it will be proxied to the container, WSS will work as well.

@y4my4my4m

Copy link
Copy Markdown
Author

@rickparrish let me know what you think

@rickparrish

Copy link
Copy Markdown
Owner

Is relocating everything into an app subdirectory required for things to work with Docker? Personally I'd prefer to see a new Docker subdirectory with the four new files saved there, if possible.

Sorry, no experience with Docker here, so these may be stupid questions...

@y4my4my4m

Copy link
Copy Markdown
Author

@rickparrish it's not required but it's something that's often done for simplicity's sake
What could be done instead is to create a docker folder that doesn't include itself during build and use the parent folder as the build context.

I'll try to come up with something and update here

@rickparrish

Copy link
Copy Markdown
Owner

I just realized I mis-read things. I see now that I must have ticked the "Place solution and project in the same directory" box when creating the project, as everything is in the root directory...I was thinking the merge request was going to create a second-level subdirectory called "app", not that it would be a new top-level directory.

With new projects I would never tick that box, so let me reorganize things the way I would create a project today, and then I don't think it will be an issue for the new Docker files to be stored in the root directory anymore.

@tracker1

Copy link
Copy Markdown

Worth considering would be publishing/pushing to Dockerhub so that a Sysop can simply run the image, with the ability to override the config. There's one for Doorparty connector, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants