Skip to content

Commit b3853af

Browse files
ci: use enclave-key from server
1 parent d61094d commit b3853af

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/workflows/reusable-api-deploy.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,27 @@ jobs:
5858
fi
5959
shell: bash
6060

61+
- name: Check configuration files on server
62+
run: |
63+
ssh -o StrictHostKeyChecking=no \
64+
-i ~/.ssh/ghrunnerci \
65+
${{ secrets.host }} << 'EOF'
66+
cd /opt/iapp-api
67+
missing=0
68+
if [ ! -f .env.app ]; then
69+
echo ".env.app file not found on remote server"
70+
missing=1
71+
fi
72+
if [ ! -f sig/enclave-key.pem ]; then
73+
echo "sig/enclave-key.pem not found on remote server"
74+
missing=1
75+
fi
76+
if [ "$missing" -ne 0 ]; then
77+
exit 1
78+
fi
79+
EOF
80+
shell: bash
81+
6182
- name: Prepare .env for Compose
6283
run: |
6384
printf "IMAGE_NAME=%s\nIMAGE_TAG=%s\n" "${{ env.IMAGE_NAME }}" "${{ inputs.tag }}"> .env

api/docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ services:
88
volumes:
99
- /var/run/docker.sock:/var/run/docker.sock
1010
# .env.app already on the server
11-
- ./.env.app:/app/.env
11+
- ./.env.app:/app/.env:ro
12+
# enclave key already on the server in sig/enclave-key.pem
13+
- ./sig/:/app/sig/:ro
1214
healthcheck:
1315
test: ['CMD', 'curl', '-f', 'http://localhost:3000/health']
1416
interval: 30s

0 commit comments

Comments
 (0)