Skip to content

Commit 4213dea

Browse files
authored
Merge pull request #21 from cuappdev/main
Updates
2 parents b818304 + 46b7b07 commit 4213dea

27 files changed

Lines changed: 1748 additions & 823 deletions

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Scraper
22
CORNELL_DINING_API_URL=
3+
SCRAPER_CRON_SCHEDULE=0 */2 * * *
34
WORKERS=
45
GOOGLE_SHEETS_API_KEY=
56
FREEDGE_SHEET_ID=
@@ -29,3 +30,5 @@ FIREBASE_SERVICE_ACCOUNT_PATH=./firebase-service-account.json
2930
PRISMA_LOG_QUERIES=true
3031
PRISMA_LOG_ERRORS=true
3132
PRISMA_LOG_WARNINGS=true
33+
34+
CBORD_BASE_URL=

.github/workflows/deploy-prod.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
script: |
4646
export IMAGE_TAG=${{ steps.vars.outputs.sha_short }}
4747
cd docker-compose
48-
docker stack rm thestack
48+
docker-compose down
4949
sleep 20s
50-
docker stack deploy -c docker-compose.yml thestack
51-
yes | docker system prune -a
50+
docker-compose up -d
51+
yes | docker system prune -a

docker-compose.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,28 @@ version: '3.8'
22

33
services:
44
app:
5-
image: cornellappdev/eatery-blue-dev:${IMAGE_TAG}
5+
image: cornellappdev/eatery-prod:${IMAGE_TAG}
66
command: >
77
sh -c "npx prisma db push && npm run start"
8-
configs:
9-
- source: firebase_service_account
10-
target: /app/firebase-service-account.json
8+
volumes:
9+
- ./firebase-service-account.json:/app/firebase-service-account.json
1110
env_file: .env
1211
networks:
13-
- eatery-network
12+
eatery-network:
13+
aliases:
14+
- app
1415
ports:
15-
- "8000:8000"
16+
- '127.0.0.1:8000:8000'
1617
depends_on:
1718
- scraper
1819

1920
scraper:
20-
image: cornellappdev/eatery-blue-dev:${IMAGE_TAG}
21+
image: cornellappdev/eatery-prod:${IMAGE_TAG}
2122
env_file: .env
2223
networks:
2324
- eatery-network
24-
command: ["sh", "-c", "npx prisma migrate deploy && npm run scrape:scheduled"]
25+
command:
26+
['sh', '-c', 'npx prisma migrate deploy && npm run scrape:scheduled']
2527

2628
networks:
2729
eatery-network:
28-
driver: overlay
29-
30-
configs:
31-
firebase_service_account:
32-
file: ./firebase-service-account.json

0 commit comments

Comments
 (0)