mirror of
https://github.com/Metastem/wikiless
synced 2024-12-06 19:16:58 +01:00
Merge pull request #17 from kuanhulio/main
harden dockerfile and docker-compose.yml
This commit is contained in:
+6
-3
@@ -1,7 +1,10 @@
|
||||
FROM node:16-alpine
|
||||
FROM node:16-alpine AS build
|
||||
WORKDIR /wikiless
|
||||
COPY . /wikiless
|
||||
RUN npm install --no-optional
|
||||
COPY config.js.template config.js
|
||||
CMD npm start
|
||||
|
||||
FROM gcr.io/distroless/nodejs:16
|
||||
COPY --from=build /wikiless /wikiless
|
||||
WORKDIR /wikiless
|
||||
COPY config.js.template config.js
|
||||
CMD ["src/wikiless.js"]
|
||||
@@ -1,5 +1,6 @@
|
||||
version: "3.9"
|
||||
services:
|
||||
|
||||
web:
|
||||
image: ghcr.io/metastem/wikiless:latest
|
||||
environment:
|
||||
@@ -9,5 +10,28 @@ services:
|
||||
REDIS_URL: redis://redis
|
||||
ports:
|
||||
- 8080:8080
|
||||
user: 65534:65534
|
||||
read_only: true
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- ALL
|
||||
networks:
|
||||
- wikiless
|
||||
|
||||
redis:
|
||||
image: "redis:alpine"
|
||||
container_name: redis
|
||||
user: nobody
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /data:size=10M,mode=0770,uid=65534,gid=65534,noexec,nosuid,nodev
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- ALL
|
||||
networks:
|
||||
- wikiless
|
||||
|
||||
networks:
|
||||
wikiless:
|
||||
Reference in New Issue
Block a user