Skip to content

Commit 02a90a2

Browse files
authored
Merge pull request #2283 from scpwiki/WJ-1293-wjfiles
[WJ-1293] Add wws service to support wjfiles routes, add Caddy for reverse proxying and HTTPS
2 parents 9a406d2 + 0500f57 commit 02a90a2

File tree

175 files changed

+8833
-1236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+8833
-1236
lines changed

.do/app.yaml

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,50 @@ domains:
1919
services:
2020
- name: framerail
2121
source_dir: .
22-
dockerfile_path: install/dev/web/Dockerfile
22+
dockerfile_path: install/dev/framerail/Dockerfile
2323
github:
2424
repo: scpwiki/wikijump
2525
branch: develop
26-
deploy_on_push: true
26+
deploy_on_push: false
2727
instance_size_slug: basic-xxs
2828
health_check:
2929
initial_delay_seconds: 3
3030
envs:
3131
- key: DEEPWELL_HOST
3232
value: '${deepwell.PRIVATE_DOMAIN}'
3333
scope: RUN_TIME
34+
- key: DEEPWELL_PORT
35+
value: '${deepwell.PRIVATE_PORT}'
36+
scope: RUN_TIME
3437

35-
- name: deepwell
38+
- name: caddy
3639
source_dir: .
37-
dockerfile_path: install/dev/api/Dockerfile
40+
dockerfile_path: install/dev/caddy/Dockerfile
3841
github:
3942
repo: scpwiki/wikijump
4043
branch: develop
41-
deploy_on_push: true
44+
deploy_on_push: false
4245
instance_size_slug: basic-xxs
43-
internal_ports: [2747]
46+
47+
- name: wws
48+
source_dir: .
49+
dockerfile_path: install/dev/wws/Dockerfile
50+
github:
51+
repo: scpwiki/wikijump
52+
branch: develop
53+
deploy_on_push: false
54+
instance_size_slug: basic-xxs
55+
health_check:
56+
initial_delay_seconds: 2
4457
envs:
58+
- key: FRAMERAIL_HOST
59+
value: '${framerail.PRIVATE_DOMAIN}'
60+
- key: DEEPWELL_URL
61+
value: 'http://${deepwell.PRIVATE_DOMAIN}:${deepwell.PRIVATE_PORT}'
62+
scope: RUN_TIME
63+
- key: REDIS_URL
64+
value: '${cache.REDIS_URL}'
65+
scope: RUN_TIME
4566
- key: S3_BUCKET
4667
value: wikijump-files-dev
4768
scope: RUN_TIME
@@ -54,12 +75,43 @@ services:
5475
- key: S3_PATH_STYLE
5576
value: 'false'
5677
scope: RUN_TIME
78+
- key: S3_ACCESS_KEY_ID
79+
type: SECRET
80+
scope: RUN_TIME
81+
value: EV[1:o7KR/O5b7OHyXKDwyazNBHvLtp3RknSX:yimWNoxvDzML1V8dtbG+PN9qUbGfi+8lzYWzl+5ImU2fxojU]
82+
- key: S3_SECRET_ACCESS_KEY
83+
type: SECRET
84+
scope: RUN_TIME
85+
value: EV[1:HcyKErP7i3GUkjNt6GzRlrwXwgfEZRR+:r/51sfR9EqTGZOIev0F2fLrN4CqBl0AB/rpVVr1y2tWbEDnhMKBKZFuWoDJRMjOAKXhZfa/Nam29wEo=]
86+
87+
- name: deepwell
88+
source_dir: .
89+
dockerfile_path: install/dev/deepwell/Dockerfile
90+
github:
91+
repo: scpwiki/wikijump
92+
branch: develop
93+
deploy_on_push: false
94+
instance_size_slug: basic-xxs
95+
internal_ports: [2747]
96+
envs:
5797
- key: DATABASE_URL
5898
value: '${database.DATABASE_URL}'
5999
scope: RUN_TIME
60100
- key: REDIS_URL
61101
value: '${cache.REDIS_URL}'
62102
scope: RUN_TIME
103+
- key: S3_BUCKET
104+
value: wikijump-files-dev
105+
scope: RUN_TIME
106+
- key: S3_REGION_NAME
107+
value: nyc3
108+
scope: RUN_TIME
109+
- key: S3_CUSTOM_ENDPOINT
110+
value: https://nyc3.digitaloceanspaces.com
111+
scope: RUN_TIME
112+
- key: S3_PATH_STYLE
113+
value: 'false'
114+
scope: RUN_TIME
63115
- key: S3_ACCESS_KEY_ID
64116
type: SECRET
65117
scope: RUN_TIME

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ftml/test
1212
ftml/target
1313
ftml/pkg
1414
deepwell/target
15+
wws/target
1516
**/__pycache__
1617
**/dist
1718
**/node_modules

.github/dependabot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ updates:
1414
schedule:
1515
interval: weekly
1616

17-
# FTML
17+
# WWS
1818
- package-ecosystem: cargo
19-
directory: "/ftml"
19+
directory: "/ws"
2020
schedule:
2121
interval: weekly

.github/workflows/deepwell.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
run: cd deepwell && cargo build --all-features
5252

5353
- name: Check Configuration
54-
run: cd deepwell && cargo run -- config.example.toml ../install/local/api/deepwell.toml ../install/dev/api/deepwell.toml ../install/prod/api/deepwell.toml
54+
run: cd deepwell && cargo run -- config.example.toml ../install/local/deepwell/deepwell.toml ../install/dev/deepwell/deepwell.toml ../install/prod/deepwell/deepwell.toml
5555
env:
5656
DEEPWELL_SPECIAL_ACTION: validate-config
5757

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: '[backend] Docker build Caddy (dev)'
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'install/dev/caddy/*'
7+
- '.github/workflows/docker-build-caddy.dev.yaml'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Build image
17+
run: docker build -f install/dev/caddy/Dockerfile .
18+
env:
19+
DOCKER_BUILDKIT: 1
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: '[backend] Docker build Caddy (local)'
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'install/local/caddy/*'
7+
- '.github/workflows/docker-build-caddy.local.yaml'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Build image
17+
run: docker build -f install/local/caddy/Dockerfile .
18+
env:
19+
DOCKER_BUILDKIT: 1
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: '[backend] Docker build Caddy (prod)'
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'install/prod/caddy/*'
7+
- '.github/workflows/docker-build-caddy.prod.yaml'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Build image
17+
run: docker build -f install/prod/caddy/Dockerfile .
18+
env:
19+
DOCKER_BUILDKIT: 1
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: '[backend] Docker build DEEWELL (dev)'
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'deepwell/**'
7+
- 'install/dev/deepwell/Dockerfile'
8+
- '.github/workflows/docker-build-deepwell.dev.yaml'
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Build image
18+
run: docker build -f install/dev/deepwell/Dockerfile .
19+
env:
20+
DOCKER_BUILDKIT: 1
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: '[backend] Docker build DEEPWELL (local)'
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'deepwell/**'
7+
- 'install/local/deepwell/Dockerfile'
8+
- '.github/workflows/docker-build-deepwell.local.yaml'
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Build image
18+
run: docker build -f install/local/deepwell/Dockerfile .
19+
env:
20+
DOCKER_BUILDKIT: 1
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: '[backend] Docker build DEEPWELL (prod)'
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'deepwell/**'
7+
- 'install/prod/deepwell/Dockerfile'
8+
- '.github/workflows/docker-build-deepwell.prod.yaml'
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Build image
18+
run: docker build -f install/prod/deepwell/Dockerfile .
19+
env:
20+
DOCKER_BUILDKIT: 1

0 commit comments

Comments
 (0)