Merge pull request #3 from faultoverload/main
Adding Docker configuration files
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
# Use an official Node.js runtime as a parent image
|
||||
FROM node:22
|
||||
|
||||
# Don't run as root
|
||||
USER node
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Create the cache directory
|
||||
RUN mkdir -p ./cache
|
||||
|
||||
# Copy the current directory contents into the container at /usr/src/app
|
||||
COPY .env *.js *.credentials package.json README.md LICENSE .
|
||||
|
||||
# Install any needed packages specified in package.json
|
||||
RUN npm install && npm update
|
||||
# Define environment variable
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Run the app when the container launches
|
||||
ENTRYPOINT ["tail", "-f", "/dev/null"]
|
||||
@@ -228,3 +228,20 @@ $ node track-investments.js
|
||||
```
|
||||
|
||||
It is recommended to run this script once per month.
|
||||
|
||||
|
||||
|
||||
# Setup with Docker:
|
||||
This guide assumes you already have a working version of docker installed and have cloned the repo to a location of your choice.
|
||||
|
||||
Build the container image
|
||||
|
||||
`docker build -t actual-helper ./`
|
||||
|
||||
Test if the docker container works correctly.
|
||||
|
||||
`docker run -itd --name actual-helper actual-helper `
|
||||
|
||||
`docker exec actual-helper node sync-banks.js`
|
||||
|
||||
If it is working correctly the bank sync should run.
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
ACTUAL_SERVER_URL="https://<Actual Budget server URL>"
|
||||
ACTUAL_SERVER_PASSWORD="<Actual Budget server password>"
|
||||
ACTUAL_SYNC_ID="<Actual Budget sync ID>"
|
||||
|
||||
# optional, for encrypted files
|
||||
ACTUAL_FILE_PASSWORD="<file password>"
|
||||
|
||||
# optional, if you want to use a different cache directory
|
||||
ACTUAL_CACHE_DIR="./cache"
|
||||
|
||||
# optional, name of the payee for added interest transactions
|
||||
INTEREST_PAYEE_NAME="Loan Interest"
|
||||
|
||||
# optional, name of the payee for added interest transactions
|
||||
INVESTMENT_PAYEE_NAME="Investment"
|
||||
# optional, name of the cateogry group for added investment tracking transactions
|
||||
INVESTMENT_CATEGORY_GROUP_NAME="Income"
|
||||
# optional, name of the category for added investment tracking transactions
|
||||
INVESTMENT_CATEGORY_NAME="Investment"
|
||||
Reference in New Issue
Block a user