Skip to content

Commit 791c867

Browse files
Update
1 parent e8bee99 commit 791c867

File tree

3 files changed

+41
-3
lines changed

3 files changed

+41
-3
lines changed

DEPLOYMENT.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Deployment Instructions
2+
3+
## Prerequisites
4+
5+
Before deploying, make sure you have the following software installed on your machine:
6+
7+
- Node.js (v14 or newer)
8+
- Docker (v20.10 or newer)
9+
10+
The following environment variables are used for deployment:
11+
12+
- `FONTAWESOME_TOKEN`: This token is used for authentication with the FontAwesome service. You need to obtain a valid token from your FontAwesome account and use it here. Please make sure not to expose this token publicly.
13+
14+
## Local Deployment
15+
16+
### Steps:
17+
18+
1. Install the dependencies:
19+
20+
```bash
21+
npm install
22+
```
23+
24+
2. Run Webpack to build the project:
25+
26+
```bash
27+
npm run prod
28+
```
29+
30+
3. Run the application:
31+
32+
```bash
33+
swift run
34+
```
35+
36+
You should now be able to see the application running at `localhost:8080`.
37+
38+
## Production Deployment
39+
40+
For deploying to production, we recommend using [Railway](https://railway.app/). Railway is a platform that allows you to deploy your application to the cloud with ease. It also provides a free tier that is sufficient for deploying this application.

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ COPY Public ./Public/
1313
RUN npx webpack --config webpack.prod.js
1414

1515

16-
FROM swift:5.8.0-focal as build
16+
FROM swift:5.8-focal as build
1717
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
1818
&& apt-get -q update \
1919
&& apt-get -q dist-upgrade -y\

Sources/App/configure.swift

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ public func configure(_ app: Application) async throws {
1414
app.http.server.configuration.responseCompression = .enabled
1515
app.http.server.configuration.supportPipelining = true
1616

17-
app.caches.use(.memory)
18-
1917
app.views.use(.leaf)
2018
app.leaf.configuration.rootDirectory = publicDirectory
2119
app.leaf.cache.isEnabled = app.environment.isRelease

0 commit comments

Comments
 (0)