chore: working dockerfile
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM node:20-slim AS base
|
||||
FROM node:lts-alpine AS base
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable
|
||||
|
||||
@@ -20,18 +20,26 @@ $ pnpm build
|
||||
Run the following command to bootstrap a **phCD** instance. As this service doesn't have auth for now, it's strongly recommended to publish only on a local ip like `127.0.0.1` and then access directly or via an ssh tunnel (something like `ssh -L 8080:127.0.0.1:8080 server`).
|
||||
|
||||
```bash
|
||||
# Clone this repo
|
||||
$ git clone https://git.phc.dm.unipi.it/phc/phcd
|
||||
|
||||
# Create config files and data folder
|
||||
$ mkdir data.local
|
||||
$ cp .env.sample .env
|
||||
$ echo 'deploys: []' > config.yaml
|
||||
|
||||
# Built docker image
|
||||
$ docker built . -t phcd
|
||||
|
||||
$ echo 'deploys: []' > config.yaml
|
||||
$ cp .env.sample .env
|
||||
|
||||
# Start container
|
||||
$ docker run -d \
|
||||
--name phcd \
|
||||
--restart unless-stopped \
|
||||
-p 127.0.0.1:8080:4321 \
|
||||
-v ./data.local:./data.local \
|
||||
-v ./config.yaml:./config.yaml \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v ./data.local:/app/data.local \
|
||||
-v ./.env:/app/.env \
|
||||
-v ./config.yaml:/app/config.yaml \
|
||||
phcd
|
||||
```
|
||||
|
||||
@@ -39,6 +47,7 @@ $ docker run -d \
|
||||
|
||||
```bash
|
||||
$ git pull
|
||||
|
||||
$ docker stop phcd
|
||||
$ docker built . -t phcd
|
||||
$ docker run -d \
|
||||
@@ -46,6 +55,7 @@ $ docker run -d \
|
||||
--restart unless-stopped \
|
||||
-p 127.0.0.1:8080:4321 \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v ./data.local:/app/data.local \
|
||||
-v ./config.yaml:/app/config.yaml \
|
||||
phcd
|
||||
```
|
||||
|
||||
+1
-2
@@ -7,7 +7,7 @@
|
||||
"lint": "astro check",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"start": "node ./dist/server/entry.mjs",
|
||||
"start": "node ./dist/server/entry.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.5.6",
|
||||
@@ -21,7 +21,6 @@
|
||||
"dockerode": "^4.0.2",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lodash": "^4.17.21",
|
||||
"nodegit": "^0.27.0",
|
||||
"preact": "^10.19.6",
|
||||
"typescript": "^5.3.3",
|
||||
"zod": "^3.22.4"
|
||||
|
||||
Generated
+14
-892
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user