mirror of
https://github.com/Metastem/wikiless
synced 2024-12-06 19:16:58 +01:00
Change docker-compose.yml to prod settings
New docker-compose.dev.yml can be used as override for development
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
node_modules/
|
||||
config.js
|
||||
docker-compose.override.yml
|
||||
*.log
|
||||
|
||||
@@ -150,13 +150,18 @@ Wikiless should now be running at <http://localhost:8080>.
|
||||
|
||||
### Docker & docker compose
|
||||
|
||||
You can build a production image by running `docker build .` in the repo's root.
|
||||
|
||||
For development, there's a `docker-compose.yml` that mounts the app code (for hot reload of code changes) and default config. Before running it, you need to install the dependencies:
|
||||
Run wikiless in production with docker compose:
|
||||
|
||||
```
|
||||
$ docker-compose run --rm web npm install --no-optionals
|
||||
$ docker-compose up
|
||||
$ docker compose up
|
||||
```
|
||||
|
||||
For development, there's a `docker-compose.dev.yml` that mounts the app code (for hot reload of code changes) and default config. Before running it, you need to install the dependencies:
|
||||
|
||||
```
|
||||
$ cp docker-compose.dev.yml docker-compose.override.yml
|
||||
$ docker compose run --rm web npm install --no-optionals
|
||||
$ docker compose up
|
||||
```
|
||||
|
||||
If you are experiencing errors with Redis not connecting, you might want to try the [alternative docker-compose.yml](https://github.com/JarbasAl/wikiless-docker).
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
version: "3.9"
|
||||
services:
|
||||
web:
|
||||
image: node:16-alpine
|
||||
volumes:
|
||||
- .:/wikiless
|
||||
- ./config.js.template:/wikiless/config.js
|
||||
- node_modules:/wikiless/node_modules
|
||||
working_dir: /wikiless
|
||||
command: npm start
|
||||
volumes:
|
||||
node_modules:
|
||||
+5
-10
@@ -1,18 +1,13 @@
|
||||
version: "3.9"
|
||||
services:
|
||||
web:
|
||||
image: node:16-alpine
|
||||
image: ghcr.io/metastem/wikiless:latest
|
||||
environment:
|
||||
REDIS_HOST: redis
|
||||
volumes:
|
||||
- .:/app
|
||||
- ./config.js.template:/app/config.js
|
||||
- node_modules:/app/node_modules
|
||||
working_dir: /app
|
||||
command: npm start
|
||||
# see config.js.template for more settings
|
||||
DOMAIN: wikiless.example.org
|
||||
HTTP_ADDR: 0.0.0.0
|
||||
REDIS_URL: redis://redis
|
||||
ports:
|
||||
- 8080:8080
|
||||
redis:
|
||||
image: "redis:alpine"
|
||||
volumes:
|
||||
node_modules:
|
||||
|
||||
Reference in New Issue
Block a user