Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions docs/setup/server/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Docker

## dev environment
Comment thread
MaddyUnderStars marked this conversation as resolved.
Outdated

This clones the master branch into a docker builder and runs a build before starting it.
To run it you need docker and docker-compose
`sudo docker compose up` or `sudo docker compose up -d`

## prod environment with local file storage

Set the following environment variables in your environment (adapt POSTGRES_USER, POSTGRES_PASSWORD):

`export POSTGRES_USER=postgres` <br />
`export POSTGRES_PASSWORD=postgres` <br />
`export POSTGRES_DATABASE=fosscord`
Comment thread
Puyodead1 marked this conversation as resolved.
Outdated

This clones the master branch into a docker builder and runs a build before starting it.
To run it you need docker and docker-compose
`sudo docker-compose -f docker-compose.prod.yaml up` or `sudo docker-compose -f docker-compose.prod.yaml up -d`

At first start, you get an

```
db_1 | 2023-03-04 17:28:25.790 UTC [63] ERROR: relation "config" does not exist at character 31
db_1 | 2023-03-04 17:28:25.790 UTC [63] STATEMENT: SELECT COUNT(1) AS "cnt" FROM "config" "ConfigEntity"
```
Comment thread
Puyodead1 marked this conversation as resolved.
Outdated

## prod environment with S3 file storage
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this section could probably just be merged with the above one instead. the content is basically the same, minus the env vars. if you go with an env vars table, just add these to it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged and insert into env variables


Set the following environment variables in your environment (adapt POSTGRES_USER, POSTGRES_PASSWORD, S3_BUCKET, S3_BUCKET_NAME,S3_BUCKET_REGION):

`export POSTGRES_USER=postgres` <br />
`export POSTGRES_PASSWORD=postgres` <br />
`export POSTGRES_DATABASE=fosscord` <br />
`export S3_BUCKET=S3://...` <br />
`export S3_BUCKET_NAME=test` <br />
`export S3_BUCKET_REGION=eu-central-1`

This clones the master branch into a docker builder and runs a build before starting it.
To run it you need docker and docker-compose
`docker-compose -f docker-compose.prod.s3.yaml up` or `docker-compose -f docker-compose.prod.s3.yaml up -d`

At first start, you get an

```
db_1 | 2023-03-04 17:28:25.790 UTC [63] ERROR: relation "config" does not exist at character 31
db_1 | 2023-03-04 17:28:25.790 UTC [63] STATEMENT: SELECT COUNT(1) AS "cnt" FROM "config" "ConfigEntity"
```
6 changes: 6 additions & 0 deletions docs/setup/server/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ If all went according to plan, you can now access your new Fosscord instance at
If you set up your server remotely, you can use `curl http://localhost:3001/api/ping` to verify the server is up and running,
(you should set up a reverse proxy, next!).

## Docker

To use docker please read the following page:

- [Docker](docker.md)

Comment thread
Puyodead1 marked this conversation as resolved.
Outdated
## Now what?

Well, now you can configure Fosscord to your liking!
Expand Down