Skip to content

Commit

Permalink
Merge pull request #2066 from scpwiki/digitalocean
Browse files Browse the repository at this point in the history
[WJ-1272] Set up DigitalOcean App Platform as new dev
  • Loading branch information
emmiegit authored Sep 8, 2024
2 parents d096242 + 6d8188e commit cd4d688
Show file tree
Hide file tree
Showing 24 changed files with 333 additions and 122 deletions.
2 changes: 2 additions & 0 deletions .do/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dev-config.yaml
/cache
75 changes: 75 additions & 0 deletions .do/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: wikijump

alerts:
- rule: DEPLOYMENT_FAILED
- rule: DOMAIN_FAILED

static_sites: []

services:
- name: framerail
source_dir: .
dockerfile_path: install/dev/digitalocean/web/Dockerfile
github:
repo: scpwiki/wikijump
branch: develop
deploy_on_push: true
instance_size_slug: basic-xxs
health_check:
initial_delay_seconds: 3
envs:
- key: DEEPWELL_HOST
value: '${deepwell.PRIVATE_DOMAIN}'
scope: RUN_TIME

- name: deepwell
source_dir: .
dockerfile_path: install/dev/digitalocean/api/Dockerfile
github:
repo: scpwiki/wikijump
branch: develop
deploy_on_push: true
instance_size_slug: basic-xxs
internal_ports: [2747]
envs:
- key: S3_BUCKET
value: wikijump-files-dev
scope: RUN_TIME
- key: S3_REGION_NAME
value: nyc3
scope: RUN_TIME
- key: S3_CUSTOM_ENDPOINT
value: https://nyc3.digitaloceanspaces.com
scope: RUN_TIME
- key: S3_PATH_STYLE
value: 'false'
scope: RUN_TIME
- key: DATABASE_URL
value: '${database.DATABASE_URL}'
scope: RUN_TIME
- key: REDIS_URL
value: '${cache.REDIS_URL}'
scope: RUN_TIME
- key: S3_ACCESS_KEY_ID
type: SECRET
scope: RUN_TIME
value: EV[1:o7KR/O5b7OHyXKDwyazNBHvLtp3RknSX:yimWNoxvDzML1V8dtbG+PN9qUbGfi+8lzYWzl+5ImU2fxojU]
- key: S3_SECRET_ACCESS_KEY
type: SECRET
scope: RUN_TIME
value: EV[1:HcyKErP7i3GUkjNt6GzRlrwXwgfEZRR+:r/51sfR9EqTGZOIev0F2fLrN4CqBl0AB/rpVVr1y2tWbEDnhMKBKZFuWoDJRMjOAKXhZfa/Nam29wEo=]

databases:
- engine: PG
name: database
version: '16'
production: true
cluster_name: wikijump-dev-db
db_name: wikijump
db_user: wikijump

- engine: REDIS
name: cache
version: '7'
production: true
cluster_name: wikijump-dev-cache
20 changes: 20 additions & 0 deletions .github/workflows/docker-build-api.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: '[backend] Docker build API (dev)'

on:
pull_request:
paths:
- 'deepwell/**'
- 'install/dev/digitalocean/api/Dockerfile'
- '.github/workflows/docker-build-api.dev.yaml'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build image
run: docker build -f install/dev/digitalocean/api/Dockerfile .
env:
DOCKER_BUILDKIT: 1
1 change: 0 additions & 1 deletion .github/workflows/docker-build-api.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ jobs:
run: docker build -f install/local/dev/api/Dockerfile .
env:
DOCKER_BUILDKIT: 1

1 change: 0 additions & 1 deletion .github/workflows/docker-build-minio.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ jobs:
run: cd install/local/dev/minio && docker build .
env:
DOCKER_BUILDKIT: 1

27 changes: 0 additions & 27 deletions .github/workflows/docker-build-push-dokku.dev.yaml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/docker-build-redis.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ jobs:
run: cd install/local/dev/redis && docker build .
env:
DOCKER_BUILDKIT: 1

Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: '[backend] Docker build Dokku (dev)'
name: '[backend] Docker build Framerail (dev)'

on:
pull_request:
paths:
- 'deepwell/**'
- 'framerail/**'
- 'install/dev/dokku/Dockerfile'
- '.github/workflows/docker-build-dokku.dev.yaml'
- 'install/dev/digitalocean/web/Dockerfile'
- '.github/workflows/docker-build-web.dev.yaml'

jobs:
build:
Expand All @@ -16,7 +15,6 @@ jobs:
uses: actions/checkout@v2

- name: Build image
run: docker build -f install/dev/dokku/Dockerfile .
run: docker build -f install/dev/digitalocean/web/Dockerfile .
env:
DOCKER_BUILDKIT: 1

1 change: 0 additions & 1 deletion .github/workflows/docker-build-web.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ jobs:
run: docker build -f install/local/dev/web/Dockerfile .
env:
DOCKER_BUILDKIT: 1

87 changes: 84 additions & 3 deletions deepwell/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions deepwell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords = ["wikijump", "api", "backend", "wiki"]
categories = ["asynchronous", "database", "web-programming::http-server"]
exclude = [".gitignore", ".editorconfig"]

version = "2024.9.6"
version = "2024.9.7"
authors = ["Emmie Smith <[email protected]>"]
edition = "2021"

Expand Down Expand Up @@ -43,7 +43,7 @@ notify = { version = "6", optional = true }
once_cell = "1"
paste = "1"
rand = "0.8"
redis = { version = "0.25", features = ["aio", "connection-manager", "keep-alive", "tokio-comp"] }
redis = { version = "0.25", features = ["aio", "connection-manager", "keep-alive", "tokio-comp", "tokio-rustls-comp"] }
ref-map = "0.1"
regex = "1"
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false }
Expand Down
Loading

0 comments on commit cd4d688

Please sign in to comment.