Simplify deployment: use manual NAS mount instead of CIFS driver
All checks were successful
build-and-deploy / build (push) Successful in 19s
All checks were successful
build-and-deploy / build (push) Successful in 19s
This commit is contained in:
@@ -25,35 +25,6 @@ jobs:
|
|||||||
docker push $REG/repodructor:${{ github.sha }}
|
docker push $REG/repodructor:${{ github.sha }}
|
||||||
docker push $REG/repodructor:latest
|
docker push $REG/repodructor:latest
|
||||||
|
|
||||||
#───────────────── deploy ─────────────────
|
# Deployment manual - mount NAS first on server:
|
||||||
deploy:
|
# sudo mkdir -p /srv/repodructor/musica
|
||||||
needs: build
|
# sudo mount -t cifs //memoria.interno.com/homes/nucleo000/musik /srv/repodructor/musica -o username=nucleo000,password=YOUR_PASSWORD,ro
|
||||||
runs-on: docker
|
|
||||||
env:
|
|
||||||
REG: gitea.nucleoriofrio.com/nucleo000
|
|
||||||
NAS_PASSWORD: ${{ secrets.NAS_PASSWORD }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Login to registry
|
|
||||||
run: docker login gitea.nucleoriofrio.com -u nucleo000 -p 7bc7b2fcd283bd6a251bef3ede368b7f897c919d
|
|
||||||
|
|
||||||
- name: Create environment file
|
|
||||||
run: |
|
|
||||||
echo "Creating .env file..."
|
|
||||||
echo "NAS_PASSWORD=${{ secrets.NAS_PASSWORD }}" > .env
|
|
||||||
echo "Environment file created successfully"
|
|
||||||
ls -la .env
|
|
||||||
echo "Content of .env file:"
|
|
||||||
cat .env
|
|
||||||
echo "---end of .env---"
|
|
||||||
|
|
||||||
- name: Pull fresh images used in compose
|
|
||||||
run: docker compose pull
|
|
||||||
|
|
||||||
- name: Clean up stack
|
|
||||||
run: docker compose --project-name repodructor down
|
|
||||||
|
|
||||||
- name: Update stack
|
|
||||||
run: |
|
|
||||||
export NAS_PASSWORD="${{ secrets.NAS_PASSWORD }}"
|
|
||||||
docker compose --project-name repodructor up -d --remove-orphans --wait
|
|
||||||
@@ -4,10 +4,8 @@ services:
|
|||||||
container_name: repodructor
|
container_name: repodructor
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- type: volume
|
# Mount manually mounted NAS directory
|
||||||
source: nas-music
|
- /srv/repodructor/musica:/app/public/music:ro
|
||||||
target: /app/public/music
|
|
||||||
read_only: true
|
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- NUXT_HOST=0.0.0.0
|
- NUXT_HOST=0.0.0.0
|
||||||
@@ -15,13 +13,6 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- principal
|
- principal
|
||||||
|
|
||||||
volumes:
|
|
||||||
nas-music:
|
|
||||||
driver_opts:
|
|
||||||
type: cifs
|
|
||||||
o: username=nucleo000,password=${NAS_PASSWORD},addr=memoria.interno.com
|
|
||||||
device: //memoria.interno.com/homes/nucleo000/musik
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
principal:
|
principal:
|
||||||
external: true
|
external: true
|
||||||
Reference in New Issue
Block a user