Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ci deploy remote host #359

Merged
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b6d0f3d
add test for HandleHTTPError
j4qfrost Aug 26, 2024
d123995
more verbose http codes
j4qfrost Aug 26, 2024
d56d930
Update Dockerfile
astrosnat Aug 26, 2024
47cb345
Update compose_dev.sh
astrosnat Aug 26, 2024
18e7b49
add failure condition test
j4qfrost Aug 26, 2024
c7690d1
Merge branch 'upstream/main'
j4qfrost Aug 27, 2024
de31424
Merge remote-tracking branch 'upstream/golang123'
j4qfrost Aug 27, 2024
3646abe
formatting and test standards
j4qfrost Aug 28, 2024
0a7fcf0
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 7, 2024
df26051
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 7, 2024
6cbb97c
add frontend file polling for wsl2
j4qfrost Sep 7, 2024
8f86e23
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 9, 2024
564ad6b
Add test for HandleHTTPError (#278)
j4qfrost Aug 28, 2024
88b4854
add failure condition test (#282)
j4qfrost Aug 29, 2024
a2ccc58
Creation of Market Price Projection API (#277)
pwdel Aug 30, 2024
a1e039c
Create SECURITY.md
pwdel Sep 4, 2024
17e26a5
Adding Fees to Buying and Selling Bets (#287)
pwdel Sep 7, 2024
327e906
Frontend fixes (#286)
markokovac16 Sep 7, 2024
f10fdde
Attempting toa ddress cors related security concern. (#298)
pwdel Sep 7, 2024
f1b4d43
Drafting out reporting stats.
pwdel Sep 7, 2024
4cc882e
Add support for dependency injection to setup (#301)
ajlacey Sep 8, 2024
29eaddf
Merge branch 'upstream/main'
j4qfrost Sep 9, 2024
9692361
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 12, 2024
5b93d90
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict…
j4qfrost Sep 20, 2024
61827a6
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 23, 2024
df4f062
revert
j4qfrost Sep 23, 2024
2da9247
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 26, 2024
f6fea8b
Fix/remove wsl check (#337)
j4qfrost Sep 23, 2024
f74ebd2
Feature/frontend vite build (#341)
j4qfrost Sep 25, 2024
454fa34
feat(ci): Add docker creation workflow
j4qfrost Sep 26, 2024
402bf2d
separate builds
j4qfrost Sep 26, 2024
7becd22
on branch up
j4qfrost Sep 27, 2024
31a03d5
main
j4qfrost Sep 27, 2024
95ecf5b
Merge branch 'feature/ci-container-build-publish'
j4qfrost Sep 27, 2024
4717a79
correct files
j4qfrost Sep 27, 2024
00857a6
remove syntax check
j4qfrost Sep 27, 2024
47896f6
fix metas
j4qfrost Sep 27, 2024
353d97d
meta access
j4qfrost Sep 27, 2024
0af2995
attestation
j4qfrost Sep 27, 2024
f3aeba1
separate attestations
j4qfrost Sep 27, 2024
c99fbbc
Merge branch 'openpredictionmarkets:main' into main
j4qfrost Sep 27, 2024
51c7a6a
latest tag
j4qfrost Sep 27, 2024
813e8c3
Merge branch 'main' of github.com:j4qfrost/socialpredict
j4qfrost Sep 27, 2024
7f822b1
tag change
j4qfrost Sep 27, 2024
4bd777c
caching
j4qfrost Sep 27, 2024
8ec1d21
buildx and tagging
j4qfrost Sep 27, 2024
1c37224
retag and test cache
j4qfrost Sep 27, 2024
d310deb
tagging
j4qfrost Sep 28, 2024
307a83d
automate on tags
j4qfrost Sep 28, 2024
87a41ef
added back for security
j4qfrost Sep 28, 2024
ad77bf3
feat(ci): Deploy workflow to staging
j4qfrost Oct 1, 2024
b29955c
squashed CI changes
j4qfrost Oct 4, 2024
aa8ff8b
args
j4qfrost Oct 5, 2024
5db94df
Updating documentation (#362)
astrosnat Oct 5, 2024
7ba4c48
Refactor user model to include private fields explicitly (#353)
ajlacey Oct 5, 2024
1627d5a
Refactor public user model (#354)
ajlacey Oct 6, 2024
ca203bd
Adding Kenyon College Logo to Front Page Readme (#364)
pwdel Oct 6, 2024
9ce775e
Fix/ci pass doc check (#363)
j4qfrost Oct 6, 2024
a0989c6
env path
j4qfrost Oct 6, 2024
6746bfa
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict…
j4qfrost Oct 6, 2024
7498307
Merge branch 'upstream/main' into feature/ci_deploy_digital_ocean
j4qfrost Oct 6, 2024
dab1165
rename deploy workflow, effective for any ssh-able target
j4qfrost Oct 7, 2024
de42a8e
rename deploy workflow, effective for any ssh-able target
j4qfrost Oct 7, 2024
5cafb9a
fix file
j4qfrost Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/deploy-digital-ocean.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy Prod configuration to Digital Ocean Staging

on:
workflow_run:
workflows: ["Create and publish a Docker image"]
types: [completed]
branches:
- 'main'
- 'v*'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to Digital Ocean droplet via SSH action
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.ACCESS_KEY }}
script: |
temp_env_file=$(mktemp)

echo """${{secrets.COMPOSE_ENV}}""" >> $temp_env_file
echo "ENV_PATH=$temp_env_file" >> $temp_env_file
if [ ! -d socialpredict-deploy ]
then
git clone ${{ github.server_url }}/${{ github.repository }} socialpredict-deploy
else
cd socialpredict-deploy
git fetch origin
fi
git checkout ${{ github.sha }}

echo "${{ secrets.DOCKER_TOKEN }}" | docker login ghcr.io -u j4qfrost --password-stdin

docker compose -f ./scripts/docker-compose-prod.yaml \
--env-file $temp_env_file \
up -d --no-deps frontend backend
2 changes: 1 addition & 1 deletion scripts/dev/env_writer_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ init_env() {

# Update APP_ENV
sed -i -e "s/APP_ENV=.*/APP_ENV='development'/g" "$SCRIPT_DIR/.env"

echo "ENV_PATH=$SCRIPT_DIR/.env" >> "$SCRIPT_DIR/.env"
}

if [[ ! -f "$SCRIPT_DIR/.env" ]]; then
Expand Down
13 changes: 8 additions & 5 deletions scripts/docker-compose-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ services:
- "${DB_PORT}:${POSTGRES_PORT}"
networks:
- database_network
env_file:
- ${ENV_PATH}

backend:
container_name: "${BACKEND_CONTAINER_NAME}"
Expand All @@ -24,18 +26,18 @@ services:
DB_HOST: db
DB_USER: ${POSTGRES_USER}
DB_PASS: ${POSTGRES_PASSWORD}
env_file:
- ../.env
ports:
- "${BACKEND_HOSTPORT}:${BACKEND_PORT}"
volumes:
- ../backend:/backend
- ../.env:/backend/.env.dev
- ${ENV_PATH}:/backend/.env.dev
command: reflex -r '\.go$' -s -- sh -c './supervisor.sh'
tty: true
networks:
- database_network
- frontend_network
env_file:
- ${ENV_PATH}
depends_on:
- db

Expand All @@ -48,7 +50,7 @@ services:
networks:
- frontend_network
env_file:
- ../.env
- ${ENV_PATH}
volumes:
- ../frontend:/app
- /app/node_modules
Expand Down Expand Up @@ -77,6 +79,8 @@ services:
networks:
- database_network
- frontend_network
env_file:
- ${ENV_PATH}
depends_on:
- backend
- frontend
Expand All @@ -94,4 +98,3 @@ networks:
driver: bridge
frontend_network:
driver: bridge

Loading