Skip to content

Commit 07aaeb1

Browse files
authored
Merge pull request #639 from CodeForPhilly/takeover_scheduler
Takeover scheduler
2 parents bd3411e + 9e7bebd commit 07aaeb1

5 files changed

Lines changed: 10 additions & 16 deletions

File tree

src/docker-compose.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3.7'
21

32
services:
43

@@ -43,11 +42,9 @@ services:
4342
scheduler:
4443
build: ./scheduler
4544
container_name: paws-scheduler
46-
ports:
47-
- "6000:6000"
4845
depends_on:
4946
- server
50-
profiles: ["production-only"]
47+
# profiles: ["production-only"]
5148

5249

5350

src/scheduler/Dockerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
FROM alpine:3.6
1+
FROM alpine:latest
2+
RUN apk add --no-cache curl bash jq
23

3-
# copy crontabs for root user
4-
COPY cronfile /etc/crontabs/root
5-
RUN apk --no-cache add curl
4+
COPY --chmod=755 trigger.sh /usr/src/trigger.sh
65

7-
# start crond with log level 8 in foreground, output to stderr
8-
CMD ["crond", "-f", "-d", "8"]
6+
CMD ["/usr/src/trigger.sh"]

src/scheduler/cronfile

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/scheduler/trigger.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
# Login and get token so we can hit the admin endpoint to trigger the run
3+
token=`curl -d '{"username":"base_admin","password":"'$BASEADMIN_PW'"}' -H "Content-Type: application/json" -X POST paws-dp-chart.default.svc.cluster.local/api/user/login | jq -r '.access_token'`
4+
curl -H "Content-Type: application/json" -H "Authorization: Bearer "$token paws-dp-chart.default.svc.cluster.local/api/admin/user/get_users

src/server/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ openpyxl
55
requests
66
pytest
77
flask-jwt-extended==4.6.0
8-
alembic
8+
alembic==1.18.1
99
flask-cors
1010
dropbox
1111
jellyfish

0 commit comments

Comments
 (0)