generated from nyu-software-engineering/final-project
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4683c18
commit 6e2ff76
Showing
6 changed files
with
75 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Deploy to DigitalOcean | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
|
||
|
||
- name: CICD | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{secrets.SSH_HOST_RQ}} | ||
key: ${{secrets.SSH_KEY_RQ}} | ||
username: ${{secrets.SSH_USERNAME_RQ}} | ||
|
||
script: | | ||
if [ ! -d "rice_trader" ]; then | ||
mkdir rice_trader | ||
fi | ||
cd rice_trader/ | ||
docker container prune -f | ||
docker image prune -f | ||
docker volume prune -f | ||
docker-compose pull | ||
docker-compose down | ||
docker-compose up -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ pytest = "*" | |
pytest-cov = "*" | ||
coverage = "*" | ||
mongomock = "*" | ||
pytest--cov = "*" | ||
|
||
[dev-packages] | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version: "3.11" | ||
|
||
services: | ||
mongodb: | ||
image: mongo:latest | ||
container_name: mongo2 | ||
ports: | ||
- "27017:27017" | ||
|
||
frontend: | ||
build: ./web-app # build the Docker image from the Dockerfile in the front-end directory | ||
image: kingslayerrq/rice:v1 | ||
container_name: traderwebappcontainer | ||
ports: | ||
- "3000:3000" | ||
depends_on: | ||
- mongodb | ||
|
||
|
||
|
||
|
||
|
||
volumes: | ||
mongodb-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters