Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# flyctl launch added from .gitignore
target
fly.toml
24 changes: 24 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
HOST=0.0.0.0
PORT=8000

#REDIS_URL=redis://default:ziURmFi6J9umiLDn8Ywxxqcl0nbnHWWs@redis-10502.c83.us-east-1-2.ec2.redns.redis-cloud.com:10502
REDIS_URL=redis://default:wDpC7hY1CkdDOkjP6xP09UtzlCp5SL5Q@redis-16155.c270.us-east-1-3.ec2.redns.redis-cloud.com:16155
#WS_SERVER=wss://websocket-rust-autumn-snow-632.fly.dev/ws
WS_SERVER=ws://localhost:8000/ws


# flyctl secrets set PORT=8000
# flyctl secrets set REDIS_URL=redis://default:sHDDM6AwFAvue0xai1FmU3fe2jkozVIp@redis-17711.c90.us-east-1-3.ec2.redns.redis-cloud.com:17711

# flyctl secrets set WS_SERVER=wss://websocket-rust-autumn-snow-632.fly.dev/ws
#REACT_APP_GOOGLE_MAPS_API_KEY=AIzaSyAYemHqW9xU48b7KhMXauA6P0fDFTWyly0
#REACT_APP_AWS_PROJECT_REGION=ap-northeast-1
#REACT_APP_AWS_COGNITO_IDENTITY_POOL_ID=
#REACT_APP_AWS_COGNITO_REGION=ap-northeast-1s
#REACT_APP_AWS_USER_POOLS_ID=ap-northeast-1_CeDvu2GtB
#REACT_APP_AWS_USER_POOLS_CLIENT_ID=7in4innl65ojj70bug3sd53guc
#REACT_APP_WEBSOCKET_URL=wss://websocket-rust-autumn-snow-632.fly.dev
# REACT_APP_WEBSOCKET_URL=ws://localhost:8000
# REACT_APP_WEBSOCKET_URL=wss://192.168.1.108
# REACT_APP_PROXY_URL=https://websocket-rust-autumn-snow-632.fly.dev

6 changes: 6 additions & 0 deletions .env.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
HOST=0.0.0.0
PORT=8000

REDIS_URL=redis://default:sHDDM6AwFAvue0xai1FmU3fe2jkozVIp@redis-17711.c90.us-east-1-3.ec2.redns.redis-cloud.com:17711
WS_SERVER=ws://localhost:8000/ws

18 changes: 18 additions & 0 deletions .github/workflows/fly-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/

name: Fly Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
concurrency: deploy-group # optional: ensure only one action runs at a time
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
45 changes: 45 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug executable websocket_rust",
"cargo":{
"args": [
"build",
"--bin=websocket_rust",
"--package=websocket_rust"
],
"filter": {
"name": "websocket_rust",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in websocket_rust",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=websocket_rust"
],
"filter": {
"name": "websocket_rust",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
20 changes: 20 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# fly.toml app configuration file generated for websocket-rust-autumn-snow-632 on 2024-10-09T17:21:24+09:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'websocket-rust-autumn-snow-632'
primary_region = 'nrt'

[build]

[http_service]
internal_port = 8000
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 0
processes = ['app']

[[vm]]
size = 'shared-cpu-1x'