···11+#Aqua setup
12NODE_ENV=development
23PORT=3000
33-HOST=localhost
44-PUBLIC_URL=
55-DB_USER=
66-DID_WEB_PUBKEY=
77-DB_PASSWORD=
88-DB_NAME=
44+HOST=0.0.0.0
55+PUBLIC_URL=A publicly accessible url for aqua
66+DB_USER=postgres
77+DB_PASSWORD=supersecurepassword123987
88+DB_NAME=teal
99DATABASE_URL="postgresql://${DB_USER}:${DB_PASSWORD}@localhost:5432/${DB_NAME}"
1010+DOCKER_DB_URL="postgresql://${DB_USER}:${DB_PASSWORD}@host.docker.internal:5432/${DB_NAME}"
1111+#This is not currently being used fully so can just use this default pubkey for now
1212+DID_WEB_PUBKEY=zQ3sheEnMKhEK87PSu4P2mjAevViqHcjKmgxBWsDQPjLRM9wP
1313+CLIENT_ADDRESS=A publicly accessible host for amethyst like amethyst.teal.fm
1414+PUBLIC_DID_WEB=did:web:{aqua's PUBLIC_URL goes here after did:web:}
1515+1616+#amethyst
1717+EXPO_PUBLIC_DID_WEB=same as PUBLIC_DID_WEB
1818+EXPO_PUBLIC_BASE_URL=same as CLIENT_ADDRESS but with http scheme like https://amethyst.teal.fm
+26-2
README.md
···2525Open http://localhost:3000/ with your browser to see the home page. You will need to login with Bluesky to test the posting functionality of the app. Note: if the redirect back to the app after you login isn't working correctly, you may need to replace the `127.0.0.1` with `localhost`.
262627272828-### Hosting the aqua appview in docker locally
2929-notes for caddy and cloud flare tunnel https://caddy.community/t/caddy-with-cloudflare-tunnel/185692828+### Running the full stack in docker for development
2929+_Still a work in progress and may have some hiccups_
3030+3131+#### 1. Set up publicly accessible endpoints.
3232+It is recommended if you are running aqua to make a publicly accessible endpoint for the app to post to. You can do that a couple of ways:
3333+3434+* Set up the traditional port forward on your router
3535+* Use a tool like [ngrok](https://ngrok.com/) with the command `ngrok http 8080` or [Cloudflare tunnels](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/) (follow the 2a. portion of the guide when you get to that point).
3636+3737+If you do the cloudflare tunnels for amethyst as well,
3838+you will also need
3939+to follow [this](https://caddy.community/t/caddy-with-cloudflare-tunnel/18569) for routing to work properly.
4040+Although you can just run it locally and it will work.
4141+4242+#### 2. Set up .envs
4343+1. copy [.env.template](.env.template) and name it [.env](.env). The docker build will pull everything from this `.env`. There are notes in the [.env.template](.env.template) on what some of the values should be.
4444+2. Follow the instructions in [piper](https://github.com/teal-fm/piper) to set up environment variables for the music scraper. But name it `.env.air`
4545+4646+#### 3. Run docker
4747+1. Make sure docker and docker compose is installed
4848+2. It is recommended to run 'docker compose -f compose.dev.yml pull' to pull the latest remote images before running the docker compose command.
4949+3. Run `docker compose -f compose.dev.yml up -d`
5050+5151+5252+And that's it! You should have the full teal.fm stack running locally. Now if you are working on aqua you can do `docker container stop aqua-app` and run that locally during development while everything else is running in docker.
5353+
···7777 depends_on:
7878 - postgres
7979 piper:
8080-# image: ghcr.io/teal-fm/piper:main
8181- image: fatfingers23/piper:latest
8080+ image: ghcr.io/teal-fm/piper:main
8281 # Depends on your .env.air
8382 ports:
8483 - "8080:8080"
···8685 - .env.air
8786 volumes:
8887 - piper_data:/db
8989-9090-# db-migrations
9191- #TODO to not forget to add an image to run db migrations or add it to aqua in a bash script on run
9288networks:
9389 app_network:
9490 driver: bridge