File tree Expand file tree Collapse file tree 6 files changed +56
-11
lines changed
Expand file tree Collapse file tree 6 files changed +56
-11
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1+ name : Deploy Production
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+
7+ jobs :
8+ deploy :
9+ name : Deploy via SSH
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Run deployment script on remote server
14+ uses : appleboy/ssh-action@v1.2.4
15+ with :
16+ host : ${{ secrets.HOST }}
17+ username : ${{ secrets.USERNAME }}
18+ key : ${{ secrets.SSH_PRIVATE_KEY }}
19+ port : ${{ secrets.PORT || 22 }}
20+ script : |
21+ cd /root/projects/strava-api-wrapper-clojure
22+
23+ git pull origin main
24+
25+ docker compose up -d --force-recreate
Original file line number Diff line number Diff line change @@ -14,3 +14,4 @@ config.edn
1414.lsp
1515.lein-failures
1616.nrepl-port
17+ compose.yml
Original file line number Diff line number Diff line change 1- FROM openjdk:19- jdk-buster
1+ FROM openjdk:27-ea- jdk-trixie
22
33RUN apt-get update && apt-get install -y curl unzip && rm -rf /var/lib/apt/lists/*
44RUN curl https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > /usr/local/bin/lein \
Original file line number Diff line number Diff line change @@ -49,6 +49,35 @@ lein run
4949
5050The server will start on port 3000 (or the port specified in config.edn).
5151
52+ ## Docker Deployment
53+
54+ For production deployment with Docker and Caddy reverse proxy, create a ` compose.yml ` file:
55+
56+ ``` yaml
57+ services :
58+ strava-api :
59+ build :
60+ context : .
61+ dockerfile : Dockerfile
62+ restart : unless-stopped
63+ networks :
64+ - caddy_net
65+ labels :
66+ - caddy=your-subdomain.yourdomain.com
67+ - caddy.reverse_proxy={{upstreams 3002}}
68+ - caddy.encode=zstd gzip
69+ expose :
70+ - 3002
71+ volumes :
72+ - ./config.edn:/usr/src/app/config.edn
73+
74+ networks :
75+ caddy_net :
76+ external : true
77+ ` ` `
78+
79+ Replace ` your-subdomain.yourdomain.com` with your actual domain. Ensure your `config.edn` file is present and properly configured.
80+
5281# # API Endpoints
5382
5483# ## Get Total Distance
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments