0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-31 02:12:43 +00:00

Updates to docker files and cooresponding documentation.

This commit is contained in:
David Bolack
2024-12-20 21:30:19 -06:00
parent 674fb6ff57
commit 2bedc6d7d4
3 changed files with 92 additions and 79 deletions

View File

@@ -1,4 +1,4 @@
FROM node:20-alpine FROM node:22-alpine
RUN apk --no-cache add git RUN apk --no-cache add git
ENV NODE_ENV=docker ENV NODE_ENV=docker
@@ -9,8 +9,10 @@ WORKDIR /usr/src/app
# Copy package.json into the image, then run yarn install # Copy package.json into the image, then run yarn install
# This improves caching so we don't have to download the dependencies every time the code changes # This improves caching so we don't have to download the dependencies every time the code changes
COPY package.json ./ COPY package.json ./
COPY config/default.json config/default.json COPY config/docker.json usr/src/app/config
# --ignore-scripts tells yarn not to run postbuild. We run it explicitly later # --ignore-scripts tells yarn not to run postbuild. We run it explicitly later
RUN node --version
RUN npm --version
RUN npm install --ignore-scripts RUN npm install --ignore-scripts
# Bundle app source and build application # Bundle app source and build application

View File

@@ -39,7 +39,19 @@ Next we build the homebrewery docker image. Start by cloning the repository.
cd homebrewery cd homebrewery
``` ```
Make an changes you need to `config/default.json` then build the image. Make an changes you need to `config/docker.json` then build the image. If it does not exist,the below as a template.
```
{
"host" : "localhost:8000",
"naturalcrit_url" : "local.naturalcrit.com:8010",
"secret" : "secret",
"web_port" : 8000,
"enable_v3" : true,
"mongodb_uri": "mongodb://172.17.0.2/homebrewery",
"enable_themes" : true,
}
```
```shell ```shell
docker-compose build homebrewery docker-compose build homebrewery

View File

@@ -1,4 +1,3 @@
version: '2'
services: services:
mongodb: mongodb:
image: mongo:latest image: mongo:latest