mirror of
https://github.com/HeyPuter/puter.git
synced 2025-01-23 06:00:21 +08:00
Add support for self-hosting in Docker
This commit is contained in:
parent
101a76a301
commit
ab4f222e92
@ -1,3 +1,5 @@
|
||||
.dockerignore
|
||||
Dockerfile
|
||||
node_modules
|
||||
config
|
||||
data
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -8,4 +8,6 @@ dist/
|
||||
.vscode/
|
||||
.env
|
||||
# this is for jetbrain IDEs
|
||||
.idea/
|
||||
.idea/
|
||||
config
|
||||
data
|
10
Dockerfile
10
Dockerfile
@ -3,10 +3,10 @@ FROM node:21-alpine
|
||||
# Set labels
|
||||
LABEL repo="https://github.com/HeyPuter/puter"
|
||||
LABEL license="AGPL-3.0,https://github.com/HeyPuter/puter/blob/master/LICENSE.txt"
|
||||
LABEL version="v1.2.40-beta"
|
||||
LABEL version="1.2.46-beta-1"
|
||||
|
||||
# Debugging
|
||||
RUN apk add --no-cache bash # useful for debugging
|
||||
# Install git (required by Puter to check version)
|
||||
RUN apk add --no-cache git
|
||||
|
||||
# Setup working directory
|
||||
RUN mkdir -p /opt/puter/app
|
||||
@ -24,7 +24,9 @@ USER node
|
||||
RUN npm cache clean --force \
|
||||
&& npm install
|
||||
|
||||
EXPOSE 4000
|
||||
EXPOSE 4100
|
||||
|
||||
HEALTHCHECK --interval=5m --timeout=3s \
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:4100/ || exit 1
|
||||
|
||||
CMD [ "npm", "start" ]
|
||||
|
@ -1,7 +1,25 @@
|
||||
version: '3'
|
||||
|
||||
---
|
||||
version: "3.8"
|
||||
services:
|
||||
app:
|
||||
build: ./
|
||||
puter:
|
||||
container_name: puter
|
||||
image: ghcr.io/heyputer/puter:latest
|
||||
pull_policy: always
|
||||
# build: ./
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 4000:4000
|
||||
- '4100:4100'
|
||||
environment:
|
||||
# TZ: Europe/Paris
|
||||
# CONFIG_PATH: /etc/puter
|
||||
PUID: 1000
|
||||
PGID: 1000
|
||||
volumes:
|
||||
- ./config:/opt/puter/app/volatile/config
|
||||
- ./data:/opt/puter/app/volatile/runtime
|
||||
healthcheck:
|
||||
test: wget --no-verbose --tries=1 --spider http://localhost:4100 || exit 1
|
||||
interval: 5m
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 2m
|
Loading…
Reference in New Issue
Block a user