Comments (7)
I think you are using someones fork of the official OpenAS2 code base because the sample docker-compose.yml for this repo does not specify any volumes:
https://github.com/OpenAS2/OpenAs2App/blob/master/docker-compose.yml
from openas2app.
I'm sorry that I wasn't clear enough. I modified the provided compose file from the repo and added the volumes.
But the question was about why the partnerships file would get overwritten on a recreate, IAC.
from openas2app.
When you say it gets overwritten with the defaults, what defaults are these and where is the file containing the defaults stored?
The code has no concept of a default set of partnerships so the only possibility I can think of is that there must be a second file somewhere that contains the defaults and somehow docker is copying it into the volume.
from openas2app.
The contents of this file is what I see after it recreates the container
https://github.com/OpenAS2/OpenAs2App/blob/master/Server/src/config/partnerships.xml
This seems to be happening during the server startup process. Docker is not doing anything here other than mapping the hostfs file inside the container to that specific location.
What I have done now is to copy all the files+dirs from the 'openas2/config' dir inside the container onto the hostfs and changed the the line to:
volumes:
- /opt/openas2/config:/opt/openas2/config
This seems to work.
I wanted to only change the files which I really needed to change and leave the rest as is. But now I have the contents of the whole config directory on the hostfs.
This is my current openas2-server section in the compose file
services:
openas2:
container_name: openas2
build:
context: .
dockerfile: Dockerfile
ports:
- 4080:10080
- 4099:10099
- 4081:10081
- 4443:10443
- 4444:10444
environment:
- OPENAS2_PROPERTIES_FILE=/opt/openas2/config/openas2.properties
- EXTRA_PARMS="-Xmx512m"
volumes:
#- /opt/openas2/config/personal.p12:/opt/openas2/config/personal.p12
#- /opt/openas/config/personal.jks:/opt/openas2/config/personal.jks
#- /opt/openas2/config/openas2.properties:/opt/openas2/config/openas2.properties
#- /opt/openas2/config/partnerships.xml:/opt/openas2/config/partnerships.xml
#- /opt/openas2/config/DB:/opt/openas2/config/DB
- /opt/openas2/config:/opt/openas2/config
- /opt/openas2/data:/opt/openas2/data
- /opt/openas2/logs:/opt/openas2/logs
tty: true
stdin_open: true
restart: always
from openas2app.
You can put the partnerships XML file and openas2.properties file somewhere like:
/opt/MyAS2Config
In the openas2.properties file make sure you have:
partnership_file=/opt/MyAS2Config/partnerships.xml
Then in the docker file set OPENAS2_PROPERTIES_FILE to /opt/MyAS2Config/openas2.properties
And set the volume so that /opt/MyAS2Config is accessible from the container.
from openas2app.
Yes, this is exactly what I did and raised this issue about the properties file getting overwritten with this method.
`The partnerships.xml is a volume mount in the docker-compose.yaml:
volumes:
- /opt/openas2/config/openas2.properties:/opt/openas2/config/openas2.properties
- /opt/openas2/config/partnerships.xml:/opt/openas2/config/partnerships.xml
In the /opt/openas2/config/openas2.properties:
partnership_file=/opt/openas2/config/partnerships.xml
environment:
- OPENAS2_PROPERTIES_FILE=/opt/openas2/config/openas2.properties
- EXTRA_PARMS="-Xmx512m"`
If you see my latest config, everything that mounts a specific file has now been commented out and Ive added the 'config' directory as a mount instead:
- /opt/openas2/config:/opt/openas2/config
from openas2app.
I'm testing with 3.7 and have this as my volume:
volumes:
- ./Server/src/config:/opt/openas2/config
The config files including partnerships are persisting.
I ran into the same issue regarding #332 but found that the partnership export from the WEBUI was producing a weird partnerships xml, I don't think it's related to this
from openas2app.
Related Issues (20)
- AS2 Transus sending issues HOT 4
- Working with content-type and file extensions HOT 3
- file type not valid error due to file.type being empty HOT 2
- WebUI Messages contains timestamps like 2023-28-11 11:54:07 HOT 1
- Self signed SSL certs in Docker HOT 1
- Error : OpenAS2Exception: Error occurred:: no cipher suites in common HOT 14
- WebUI network error HOT 2
- Image does not start with custom private key or keystore HOT 2
- Avoid running as root HOT 1
- Embedded database maintenance HOT 1
- Content-Length header isn't populated on synchronous MDN sent after receiving a file HOT 2
- Typo in the documentation ? HOT 1
- Unable to log in via WebUI HOT 11
- On Ubuntu 20.04.6 LTS with jdk1.8.0_92 Server not starting. HOT 1
- Issue: file stored on sent dir on resend, message ID pendingMDN issue HOT 2
- [Feature?] Parsing and Synchronize files to Partners after MDN HOT 2
- Response Code: 411 Length Required OpenAS2 3.9.1 HOT 1
- Filename header decoding issue HOT 6
- [ERROR] java.lang.NullpointerException HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openas2app.