Skip to content

Commit bc2e3ed

Browse files
author
Janaka-Steph
authored
Merge pull request #8 from bitcoin-studio/o2switch
Move to vpn hosting
2 parents b9c821a + 5c02237 commit bc2e3ed

158 files changed

Lines changed: 12494 additions & 16258 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
# For OpenFaaS Localhost in HTTP No custom domain and Okteto Dev
21
PUBLIC_URL=/function/bitcoin-studio-client
32
REACT_APP_SEND_EMAIL_URL=/api/send-email
3+
SMTP_GMAIL_PASS=***
4+
PORT=8081
File renamed without changes.

.github/workflows/master.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/staging.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14
1+
14

README.adoc

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -8,97 +8,3 @@
88
* Styling
99
** Sass pre-processor
1010
** CSS Grid for the layout
11-
12-
13-
== Hosting
14-
15-
MicroService function hosted on OpenFaaS. +
16-
Based on OpenFaaS Dockerfile template, serving the app with Nginx: +
17-
https://github.com/alexellis/static-site-template
18-
19-
20-
== Running the prod locally
21-
22-
.In one tab
23-
kubectl port-forward svc/gateway -n openfaas 8080:8080
24-
25-
.In a other tab
26-
faas up
27-
28-
29-
== Developing with Okteto
30-
31-
.Make sure the prod image is deployed
32-
faas up
33-
34-
.Build a dev image with NodeJS and Nginx into the local Docker library
35-
DEV=dev faas build
36-
37-
.Push that image to Okteto container registry
38-
DEV=dev faas push
39-
40-
cd function
41-
42-
.Sync local source code with remote using dev image
43-
okteto up
44-
45-
=== Inside Okteto console
46-
47-
.Run OpenFaaS watchdog in the background
48-
fwatchdog &
49-
50-
.Press Enter
51-
52-
.Install dependencies
53-
cd function
54-
55-
npm ci
56-
57-
.Run build on file change
58-
npm run watch
59-
60-
61-
=== Shortcomings
62-
63-
==== No Hot Reloading
64-
65-
For now, create-react-app doesn't give to possibility to write webpack-dev-server output to disk (see https://github.com/facebook/create-react-app/pull/6144[this thread]).
66-
We are forced to use an external tool. This project uses https://github.com/Nargonath/cra-build-watch[cra-build-watch].
67-
It works fine but doesn't allow for hot reloading.
68-
69-
==== Service Worker
70-
71-
The service worker may cause issues. If you activate it, make sure to develop the app in incognito window on Chrome or similar.
72-
73-
74-
75-
== Differences in Dev/Prod Environments
76-
77-
=== Development - 127.0.0.1 and Okteto Serving From SubPath
78-
79-
.Environment variables
80-
PUBLIC_URL=/function/bitcoin-studio-client
81-
REACT_APP_SEND_EMAIL_URL=https://openfaas-ingress-janaka-steph.cloud.okteto.net/function/bitcoin-studio-client/api/send-email
82-
83-
.Manifest.json
84-
start_url = "/function/bitcoin-studio-client/index.html"
85-
86-
.Nginx
87-
/api/email points to dev server
88-
89-
.Deploy command
90-
faas up -f stack-dev.yml -n janaka-steph
91-
92-
93-
=== Production - Custom Domain (using FunctionIngress CRD)
94-
95-
.Environment variables
96-
No PUBLIC_URL
97-
REACT_APP_SEND_EMAIL_URL=/api/send-email
98-
99-
.Manifest.json
100-
start_url = "."
101-
102-
.Nginx
103-
/api/email points to prod server
104-

function/.dockerignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

function/.stignore

Lines changed: 0 additions & 12 deletions
This file was deleted.

function/Dockerfile

Lines changed: 0 additions & 24 deletions
This file was deleted.

function/nginx/default.conf

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)