Skip to content

Commit f3db76e

Browse files
improve readme and config
1 parent ad3f28e commit f3db76e

File tree

2 files changed

+48
-6
lines changed

2 files changed

+48
-6
lines changed

README.md

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,53 @@
11
# Fileonchain
22

3-
To start the server:
3+
Fileonchain is a secure file storage solution that allows anyone to upload small and large files to any substrate network, making them permanently available on-chain ⛓️.
44

5-
* Run `docker compose up` in one terminal window to start Postgres and Hasura
6-
* Run `mix setup` to install and setup dependencies
7-
* Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`
5+
## Official Links
6+
7+
- Website: [https://fileonchain.org](https://fileonchain.org)
8+
- Twitter/X: [@fileonchain](https://twitter.com/fileonchain)
9+
10+
## Getting Started
11+
12+
### Using Docker Compose
13+
14+
1. Ensure you have Docker and Docker Compose installed on your system.
15+
16+
2. Clone the repository and navigate to the project directory.
17+
18+
3. Create a `.env` file in the root directory with the following environment variables:
19+
```
20+
DB_PASSWORD=your_db_password
21+
DB_PORT=5432
22+
DB_USER=your_db_user
23+
HASURA_GRAPHQL_ADMIN_SECRET=your_hasura_admin_secret
24+
DATABASE_URL=postgres://your_db_user:your_db_password@db:5432/fileonchain
25+
SECRET_KEY_BASE=your_secret_key_base
26+
PHX_HOST=localhost
27+
```
28+
29+
4. Run the following command to start all services:
30+
```
31+
docker compose up
32+
```
33+
34+
5. Once all containers are up and running, you can access:
35+
- The Phoenix application at [`http://localhost:4000`](http://localhost:4000)
36+
- The Hasura GraphQL engine at [`http://localhost:8080`](http://localhost:8080)
37+
38+
### Manual Setup (for development)
39+
40+
If you prefer to run the services separately:
41+
42+
1. Run `docker compose up db graphql-engine` to start Postgres and Hasura.
43+
2. Run `mix setup` to install and setup dependencies.
44+
3. Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`.
845

946
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
1047

11-
Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html).
48+
## Live Demo
49+
50+
You can try out the live demo of Fileonchain at [https://staging.fileonchain.org/](https://staging.fileonchain.org/).
1251

1352
## Learn more
1453

@@ -17,3 +56,7 @@ Ready to run in production? Please [check our deployment guides](https://hexdocs
1756
* Docs: https://hexdocs.pm/phoenix
1857
* Forum: https://elixirforum.com/c/phoenix-forum
1958
* Source: https://github.com/phoenixframework/phoenix
59+
60+
## Deployment
61+
62+
Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html).

config/config.exs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ config :fileonchain,
1414
# Configures the endpoint
1515
config :fileonchain, FileonchainWeb.Endpoint,
1616
url: [host: System.get_env("PHX_HOST") || "localhost"],
17-
check_origin: [System.get_env("PHX_HOST") || "localhost"],
1817
adapter: Bandit.PhoenixAdapter,
1918
render_errors: [
2019
formats: [html: FileonchainWeb.ErrorHTML, json: FileonchainWeb.ErrorJSON],

0 commit comments

Comments
 (0)