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

Run the server docker image #40

Closed
mranv opened this issue Sep 16, 2023 · 3 comments
Closed

Run the server docker image #40

mranv opened this issue Sep 16, 2023 · 3 comments
Assignees

Comments

@mranv
Copy link

mranv commented Sep 16, 2023

docker run -it --rm --volume /path/to/ocsf-schema:/app/schema -p 8080:8080 -p 8443:8443 ocsf-server

Change the path/to to your local OCSF schema directory (use an absolute path). Note, the -p 8443:8443 parameter enables HTTPS with a self-signed SSL certificate.

The repo of schema doesn't contain folders and files like /path/to/ocsf-schema:/app/schema

@jp-harvey
Copy link
Contributor

Hi @mranv, what that means is map the /app/schema path in the container to the /path/to/ocsf-schema folder on the local machine, the latter being the ocsf-schema path. So if your ocsf-schema repo is in /home/mranv/repos/ocsf-schema then the command would look like:

docker run -it --rm --volume /home/mranv/repos/ocsf-schema:/app/schema -p 8080:8080 -p 8443:8443 ocsf-server 

Does that solve it?

@rmouritzen-splunk
Copy link
Contributor

The ocsf-server repo's README.md was updated with an example docker run with an example replacement of /path/to.

About the SSL certificate, please note that the self-signed certificate is not actually used in the actual https://schema.ocsf.io server. This server uses Nginx in front of the web app, and Nginx is handling the SSL with a properly signed certificate.

If you'd like to host your fork of the OCSF server, either want to do the same, or if you want to have the underlying Erlang VM handle SSL, you'll need to dig in to how the Phoenix web server configuration gets passed the certificate details. This may require a change to the Phoenix configuration file if your certificate's private key requires a password. This is a bit much to describe here, and there is more than one way to do this, so if you need to go down this path and get stuck, let me know and I can help... and if we do this, I'd probably added the require options to the app, and describe it all in the README.md.

@rmouritzen-splunk rmouritzen-splunk self-assigned this Sep 25, 2023
@rmouritzen-splunk
Copy link
Contributor

No further questions, so closing.

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

3 participants