Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
stax_backend_api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aryan Noshirvani
stax_backend_api
Commits
724e57fd
Commit
724e57fd
authored
Aug 01, 2026
by
Aryan Noshirvani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Dockerfile, docker-compose.yml, and .gitlab-ci.yml for CI/CD
parent
c676e123
Pipeline
#960
failed with stages
in 16 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
0 deletions
+74
-0
.gitlab-ci.yml
.gitlab-ci.yml
+35
-0
Dockerfile
Dockerfile
+20
-0
docker-compose.yml
docker-compose.yml
+19
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
724e57fd
stages
:
-
test
-
deploy
variables
:
PYTHON_VERSION
:
"
3.10"
test_api
:
stage
:
test
image
:
python:3.10-slim
before_script
:
-
apt-get update && apt-get install -y ffmpeg git build-essential
-
pip install --no-cache-dir -r requirements.txt pytest
script
:
-
pytest tests/
only
:
-
main
-
merge_requests
deploy_prod
:
stage
:
deploy
image
:
alpine:latest
before_script
:
-
apk add --no-cache openssh-client bash
-
eval $(ssh-agent -s)
-
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
script
:
-
echo "Deploying to production server..."
# Connect via SSH to production runner or jump host
-
ssh -p ${PROD_SSH_PORT:-22} root@${PROD_SERVER_IP:-216.126.237.62} "cd /root/antigrav-stax-audio && git pull origin main && docker-compose up -d --build || (pkill -f uvicorn ||
true
; source venv/bin/activate && nohup uvicorn src.api.main:app --host 0.0.0.0 --port 8000 > api.log 2>&1 &)"
only
:
-
main
Dockerfile
0 → 100644
View file @
724e57fd
FROM
python:3.10-slim
# Install system dependencies including ffmpeg for audio processing
RUN
apt-get update
&&
apt-get
install
-y
\
ffmpeg
\
git
\
curl
\
build-essential
\
&&
rm
-rf
/var/lib/apt/lists/
*
WORKDIR
/app
COPY
requirements.txt .
RUN
pip
install
--no-cache-dir
-r
requirements.txt
COPY
. .
EXPOSE
8000
CMD
["uvicorn", "src.api.main:app", "--host", "0.0.0.0", "--port", "8000"]
docker-compose.yml
0 → 100644
View file @
724e57fd
version
:
'
3.8'
services
:
stax-api
:
build
:
.
container_name
:
stax_backend_api
restart
:
always
ports
:
-
"
80:8000"
environment
:
-
HTTP_PROXY=${HTTP_PROXY:-}
-
HTTPS_PROXY=${HTTPS_PROXY:-}
-
NO_PROXY=localhost,127.0.0.1
volumes
:
-
./downloads:/app/downloads
-
./temp:/app/temp
-
./stax.db:/app/stax.db
env_file
:
-
.env
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment