Hello,
I want to deploy the latest version of Axelor from Docker.
I have seen that it is available on the hub at Docker.
I wanted to know if there was the associated Dockerfile available anywhere ?
Thank you for your help !
Thomas
Hello,
I want to deploy the latest version of Axelor from Docker.
I have seen that it is available on the hub at Docker.
I wanted to know if there was the associated Dockerfile available anywhere ?
Thank you for your help !
Thomas
Thank you for your answer. There are 3 dockerfiles. I guess I gotta use them all to build the AOS image ?
I can see that these dockerfiles have been published 4 years ago but references are made to GitHub. Is it the way the dockerfiles can build the lateste version of AOS ?
Hello @thoamss
I don’t know why you need the dockerfile ?!
In any case, the procedure below, recommended by Axelor, builds the image axelor/aos-preview-app and launches the container aos, in less than 5 minutes.
docker run --name aos -d --publish 10080:8080 --env 'APP_LANGUAGE=en' --env 'APP_DEMO_DATA=true' --env 'APP_LOAD_APPS=true' --env 'APP_DEMO_DATA=true' --volume /srv/aos/data:/app/data --volume /srv/aos/postgresql:/var/lib/postgresql axelor/aos-preview-app
Image axelor/aos-preview-app
REPOSITORY TAG IMAGE ID CREATED SIZE
axelor/aos-preview-app latest 2a3934ba122d 6 days ago 1.36GB
Container aos
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a8d4f408e86e axelor/aos-preview-app "docker-entrypoint.s…" 31 minutes ago Up 31 minutes 0.0.0.0:10080->8080/tcp, :::10080->8080/tcp aos
You can find the ip address of the aos process by running the following command:
docker network inspect bridge | grep IPv4
Then with your browser you should
http://[aos_address]
your application is launched and admin/admin gives you access to the latest version of Axelor applications filled in with the demo data.
Regards
Hello and thank you for your answer !
I deployed an Axelor image on a server accessible via the address ‹ http://myip/ ›. However, I need the application to be accessible via ‹ http://myip/address/ ›. I can’t redirect traffic from a proxy server or other external tool, so I have to modify the application itself or the Docker configuration. Therefore, I want to modify the Dockerfile so that the application listens on the ‹ /address › path instead of the root (’/’).
There is a better way. You can start from a standard container with the necessary tools like tomcat:8.5.84-jdk8-temurin-jammy and deploy the war file in whatever path you want. For the database use a separate container (more convenient for management)
If you modify the dockerfile you can change the name of the war into somethining like « axelor-erp »
COPY --from=builder /app/src/axelor-erp/build/libs/axelor-erp-*.war $CATALINA_BASE/webapps/axelor-erp.war
that must create a directory « axelor-erp » where deploy all the application
(never tried, but it how tomcat work)
Thank you for your answers ! I am trying your solutions today !
Hi ! I’ve been trying plenty of solutions but yours seems to be my favourite.
I’ve created a docker image based on adoptopenjdk/openjdk8 and left my database on my computer for the moment. I have issues accessing the database from the container. When I start the container, it starts the server but I get an error :
"org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. "
Have you ever had this issue before ? It might disapear when I deploy my image on a server but I would rather have a working solution before doing this.
Thanks for your help !
Hi,
From within the container you can’t access host services by using localhost (the localhost dns name refers to the container itself)
Take a look at this stackoverflow answer for more insight nginx - From inside of a Docker container, how do I connect to the localhost of the machine? - Stack Overflow
Regards