chore: added docker compose file

main
Antonio De Lucreziis 11 months ago
parent cca7433e60
commit 9252b064fc

@ -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

@ -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
Loading…
Cancel
Save