fix deployment folder permisions
This commit is contained in:
parent
385e7944b7
commit
86a8cc66b6
3 changed files with 7 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# deploy-zero-downtime.sh
|
# deploy-zero-downtime.sh
|
||||||
|
cd /home/exedev/candle_annotator
|
||||||
|
|
||||||
echo "🔄 Pulling latest code..."
|
echo "🔄 Pulling latest code..."
|
||||||
git pull
|
git pull
|
||||||
|
|
|
||||||
3
services/ml/.env.example
Normal file
3
services/ml/.env.example
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
DATABASE_URL=postgresql://pg_user:pg_password@localhost:5432/candle_annotator
|
||||||
|
# openssl rand -hex 32 add to main .env too
|
||||||
|
API_KEY=ML_API_KEY
|
||||||
|
|
@ -29,8 +29,9 @@ COPY . .
|
||||||
EXPOSE 8001
|
EXPOSE 8001
|
||||||
|
|
||||||
# Create non-root user and set ownership
|
# Create non-root user and set ownership
|
||||||
RUN useradd -r -s /bin/false appuser
|
RUN useradd -r -s /bin/false appuser && \
|
||||||
RUN chown -R appuser:appuser /app
|
mkdir -p /app/data/raw /app/data/processed && \
|
||||||
|
chown -R appuser:appuser /app
|
||||||
|
|
||||||
# Switch to non-root user
|
# Switch to non-root user
|
||||||
USER appuser
|
USER appuser
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue