chore: added docker compose file

This commit is contained in:
2024-03-13 00:49:32 +01:00
parent cca7433e60
commit 9252b064fc
2 changed files with 17 additions and 16 deletions
+3 -16
View File
@@ -28,19 +28,8 @@ mkdir data.local
cp .env.sample .env
echo 'deploys: []' > config.yaml
# Built docker image
docker built . -t phcd
# Start container
docker run -d \
--name phcd \
--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 ./.env:/app/.env \
-v ./config.yaml:/app/config.yaml \
phcd
# Build and start the container
docker compose up -d --build
```
### Updating
@@ -49,9 +38,7 @@ Just pull changes and update the docker image, then use the command from before
```bash
git pull
docker stop phcd
docker rm phcd
docker built . -t phcd
docker compose up -d --build
```
### TODO: Self-Updating
+14
View File
@@ -0,0 +1,14 @@
version: "3.8"
services:
phcd:
build: .
image: phcd
container_name: phcd
restart: unless-stopped
ports:
- "8080:4321"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data.local:/app/data.local
- ./.env:/app/.env
- ./config.yaml:/app/config.yaml