Implement functionality to create the oauth_creds.json file from environment variables (ACCESS_TOKEN, REFRESH_TOKEN, EXPIRY_DATE) if the file is missing. Also update documentation, docker-compose, and build scripts to support this new feature.
26 lines
584 B
Docker
26 lines
584 B
Docker
# Use an official Node.js runtime as a parent image
|
|
FROM node:22.15-slim
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /usr/src/app
|
|
|
|
# Create directory for oauth credentials
|
|
RUN mkdir -p /root/.gemini
|
|
|
|
# Copy package.json and package-lock.json to the working directory
|
|
COPY package*.json ./
|
|
|
|
# Install any needed packages specified in package.json
|
|
RUN npm install
|
|
|
|
# Bundle app source
|
|
COPY . .
|
|
|
|
# Build the typescript code
|
|
RUN npm run build
|
|
|
|
# Make port 4343 available to the world outside this container
|
|
EXPOSE 4343
|
|
|
|
# Define the command to run the app
|
|
CMD [ "npm", "start" ] |