-
Notifications
You must be signed in to change notification settings - Fork 93
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
[Feature] - Docker container/image #26
Comments
I've thought about this before, but wasn't sure with the configuration. The configuration is located in a local file. I think it doesn' t make sense to have that inside the container. The database and configuration should live outside the docker container so that you can easily replace the container with a new version but keep your data. |
I have somewhat acheived that already. This is my docker compose config: version: '3'
name: ocpp
services:
server:
image: ocpp.server:latest // <--- just moved the complied files to my container
container_name: OCPP.Server
restart: always
ports:
- [a port]:8081
volumes:
- dbdata:/db
management:
image: ocpp.management:latest // <--- just moved the complied files to my container
container_name: OCPP.Management
restart: always
ports:
- [a port]:8082
volumes:
- dbdata:/db
depends_on:
- server
volumes:
dbdata: // <--- creates a docker volume and every container mount it.. but not optimal :) If you can somehow acheive to move the config from appsettings.json to the db.. |
There's no need to touch the app settings file, you can use environment variables which take priority over the app settings. You can create a docker-compose.override.yml file with these settings. Or you can just add it to your other docker file. Anything you don't specify will still come from the appsettings. You can also set it in a .env file ofcourse.
If you need the rest of the docker-compose file or the actual Dockerfile, let me know and I can do a pull request. |
Hi
I think this project is worth to be available as docker image :)
If it helps, i could provide a PR here.. so tell ma what you think :)
The text was updated successfully, but these errors were encountered: