Add Docker improvements and containerization
This commit is contained in:
1 parent
545cf4c8dc
commit
fdda517e7b
8 files changed
+313
-14
No files matched your search
+13
-3
@@ -2,11 +2,21 @@ version: "3.9"
|
||||
|
||||
services:
|
||||
spelling-app:
|
||||
build: .
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: ghcr.io/nmemmert/spelling:1.1.0
|
||||
container_name: spelling-app
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./public/users.json:/app/public/users.json
|
||||
- ./public/wordlists.json:/app/public/wordlists.json
|
||||
- ./data:/app/data
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000', res => res.statusCode === 200 ? process.exit(0) : process.exit(1))"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
Reference in new issue
Block a user