Skip to content

Commit bf6ecf3

Browse files
committed
Update docs
1 parent 348fcbf commit bf6ecf3

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ COPY --from=deps /app/node_modules ./node_modules
3333
COPY --from=ui . .
3434

3535
ENV NODE_ENV=production
36-
ARG NEXT_PUBLIC_CONSOLE_API_ADDR
37-
ENV NEXT_PUBLIC_CONSOLE_API_ADDR=$NEXT_PUBLIC_CONSOLE_API_ADDR
36+
ENV NEXT_PUBLIC_CONSOLE_API_ADDR=http://127.0.0.1:8080
3837

3938
RUN npm run build
4039

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,20 @@ And you should be able to access the UI on http://localhost:3000 (default basic
260260
261261
## Deployment
262262
263-
There are 3 parts that need to be deployed:
263+
You can deploy individual services to any cloud provider:
264264
265265
- Go backend. It's packaged as a Docker container and can be deployed to any cloud provider.
266266
- Next.js frontend. It's also packaged as a Docker container, but also can be deployed to Vercel or Netlify.
267267
- [Optional] Postgres database. You can use managed Postgres services or deploy it yourself.
268268
269269
The demo service (links above) is deployed to Fly.io (Go, SQLite) and Vercel (Next.js) and are under the free tiers.
270270
271+
There is also a combined version of Go and Next.js in the same Docker container. You can run it with:
272+
273+
```
274+
docker-compose -f compose-combined.yml up -d --build
275+
```
276+
271277
### Environment Variables
272278
273279
API:

compose-combined.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,18 @@ services:
77
additional_contexts:
88
api: ./api
99
ui: ./ui
10-
args:
11-
- NEXT_PUBLIC_CONSOLE_API_ADDR=http://127.0.0.1:8080
1210
ports:
1311
- "3000:3000"
1412
- "8080:8080"
1513
init: true
1614
environment:
1715
- LOG_LEVEL=debug
1816
- DATABASE_TYPE=sqlite # postgres|sqlite
19-
- DATABASE_URL=/data/db/formulosity.db
17+
- DATABASE_URL=/data/sqlite3/formulosity.db
2018
- SURVEYS_DIR=/data/surveys
2119
- CONSOLE_API_ADDR=http://127.0.0.1:8080
2220
- IRON_SESSION_SECRET=e75af92dffba8065f2730472f45f2046941fe35f361739d31992f42d88d6bf6c
2321
- HTTP_BASIC_AUTH=user:pass
2422
volumes:
25-
- formulosity_db:/data/db
2623
- ./api/surveys:/data/surveys
27-
28-
volumes:
29-
formulosity_db:
24+
- ./api/sqlite3:/data/sqlite3

0 commit comments

Comments
 (0)