Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with docker-compose.yml #62

Open
loucdg opened this issue Mar 25, 2021 · 5 comments
Open

Issues with docker-compose.yml #62

loucdg opened this issue Mar 25, 2021 · 5 comments

Comments

@loucdg
Copy link

loucdg commented Mar 25, 2021

I was getting the error "ERROR: Named volume "rfproxy_log_data:/var/log/scot:rw" is used in service "rfproxy" but no declaration was found in the volumes section.". I changed two lines in docker-compose.yml which possibly solved this (still troubleshooting):

rfproxy:
volumes:
- "./rfproxy_log_data:/var/log/scot/"

image: sandialabs/scot_perl

It seems the sandialabs/scot_rfproxy directory doesn't exist?

Also, the /etc/timezone files in the docker-compose.yml file for mongo, apache, rfproxy and scot were throwing the following error: ERROR: for apache Cannot start service apache: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: rootfs_linux.go:59: mounting "/home/ec2-user/scot/etc/timezone" to rootfs at "/var/lib/docker/overlay2/6f815a39db2b8d8d95fc94c554bd55f82ae4fe55aba678c35baaa4f56df788ef/merged/etc/timezone" caused: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

So I commented them out.

# - "/etc/timezone:/etc/timezone:ro"
# - "/etc/localtime:/etc/localtime:ro"

Finally, the apache build had the following error:
ERROR: for apache Cannot create container for service apache: maximum retry count cannot be used with restart policy 'always'

Need to change that line to "on-failure":

deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3

@loucdg loucdg changed the title Issues with Rfproxy Issues with docker-compose.yml Mar 26, 2021
@toddbruner
Copy link
Contributor

Thank you for the bug reports. Can you share the docker version and the host OS you are running your containers on? This will allow me to test updates.

@digoblin
Copy link

Hello, @loucdg thank you for the tips, I also encountered problems using the docker-compose on a freshly installed ubuntu server 20.04.2 version.
Docker version: Docker version 20.10.8, build 3967b7d
Docker-compose version: docker-compose version 1.29.2, build 5becea4c

First the error with rfproxy docker not being available, I then commented it in the docker-compose.yml file, and seemed to fix it, but don't know how crucial that container is:
rfproxy error

Then also had the issue that got resolved with the restart policy setting it to "on-failure":
on-failure error

Now I'm having troubles with the scot container exiting after starting:
Can't load application from file "/opt/scot/script/Scot": Can't locate object method "requires" via package "Mojolicious::Routes::Route" at /opt/scot/script/../lib/Scot/Util/CSRFProtection.pm line 39.

containers

Any tips of how to fix this? I really enjoyed the demo site and wanted to give this a try.

Thank you for your time reading this and all the development done, the project seems awesome.

@toddbruner
Copy link
Contributor

toddbruner commented Aug 25, 2021 via email

@TheScaz
Copy link

TheScaz commented Oct 23, 2021

I have a fix for the CSRF issue to get it running for people that want to check out SCOT - I will preface this that I have no idea how this effects the CSRF protections and this is just a dirty hack - but it works:

Edit the Dockerfile-Scot file and add the following line after the "EXPOSE 3000" Line:
RUN sed -i 's/requires/over/' /opt/scot/lib/Scot/Util/CSRFProtection.pm

Rebuild the Scot docker image:
docker build -f ./Dockerfile-Scot . --tag sandialabs/scot_scot

Start the system:
docker-compose up -d

Should be able to log in - but I am having issues with the API to get alerts in.

Hope this helps.

@toddbruner
Copy link
Contributor

toddbruner commented Oct 25, 2021 via email

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

No branches or pull requests

4 participants