Reputation: 3
I use ArangoDB as a backend server for my web application. So far I have used the Foxx CLI to deploy my code to the ArangoDB server. I wanted to deploy my entire application using Docker, but I can't figure out how to add my Foxx service source codes to an ArangoDB using containers. Is it possible? If it is so what would be the correct way to do this?
So far I have tried a docker-compose approach: running the official ArangoDB image and building another image equipped with Foxx CLI to install the source files, but I got "connection refused" error from the database server when I ran the "foxx install" method from the container. (The ArangoDB server was working fine and I could run the "foxx install" command successfully outside virtualization).
Upvotes: 0
Views: 255
Reputation: 1830
For development purposes, I just keep the Foxx services in development mode and map the Foxx folder in my ArangoDB container (/var/lib/arangodb3-apps/_db/) to a folder in my machine using docker-compose volume definition.
Here is what a sample docker-compose service for ArangoDB could look like:
services:
arangodb_dev:
image: arangodb
container_name: my_arangodb_dev
environment:
- ARANGO_ROOT_PASSWORD=XXXXXX
ports:
- "8529:8529"
volumes:
- ./Arango/db:/var/lib/arangodb3
- ./Arango/apps_db_system:/var/lib/arangodb3-apps/_db/
Above we map both the Foxx service directory and the DB files directory to a local folder for persistency purposes.
Beyond development, you probably want to copy the files to the correct folder in the container instead of mapping the folder
Upvotes: 0