Docker files to easily run OpenAccounting locally.
OpenAccounting needs three components to run:
- oa-server: an API server (written in Go)
- oa-web: a web interface (written in Angular)
- A mysql database
I personally like to run my software inside Docker containers. This repo contains a docker-compose.yml file which will bring up 4 containers:
- a maria/mysql database on an internal network.
- git clone the latest version of oa-server, build it, and run it on the internal network.
- git clone the latest version of oa-web, patch it, build it, and run it on the internal network.
- run two socats to forward
port 8080
to oa-server andport 4200
to oa-web.
You can adjust the docker-compose.yml file if you want different ports.
To run things, simply do:
$ docker-compose build
$ docker-compose up
You can then connect to http://localhost:4200. You'll have to set the server to http://localhost:8080
. You can then create your first user. You'll need to manually mark the email as verified:
docker exec -it openaccounting-mysql mariadb -u root -psecret -h localhost --protocol tcp openaccounting -e 'update user set emailVerified=1';
- The oa-web patch tells the web frontend to connect to localhost using
ws://
instead ofwss://
since localhost isn't using TLS. - The oa-web code runs in development mode. Perhaps the default should be to include the
-prod
flag. - This repo contains a concatenation of schema.sql and indexes.sql which needs to be kept in sync.
- If you don't want to bother running the software on your own hardware, you can sign up for a cloud-based account.