···1+#Aqua setup
2NODE_ENV=development
3PORT=3000
4+HOST=0.0.0.0
5+PUBLIC_URL=A publicly accessible url for aqua
6+DB_USER=postgres
7+DB_PASSWORD=supersecurepassword123987
8+DB_NAME=teal
09DATABASE_URL="postgresql://${DB_USER}:${DB_PASSWORD}@localhost:5432/${DB_NAME}"
10+DOCKER_DB_URL="postgresql://${DB_USER}:${DB_PASSWORD}@host.docker.internal:5432/${DB_NAME}"
11+#This is not currently being used fully so can just use this default pubkey for now
12+DID_WEB_PUBKEY=zQ3sheEnMKhEK87PSu4P2mjAevViqHcjKmgxBWsDQPjLRM9wP
13+CLIENT_ADDRESS=A publicly accessible host for amethyst like amethyst.teal.fm
14+PUBLIC_DID_WEB=did:web:{aqua's PUBLIC_URL goes here after did:web:}
15+16+#amethyst
17+EXPO_PUBLIC_DID_WEB=same as PUBLIC_DID_WEB
18+EXPO_PUBLIC_BASE_URL=same as CLIENT_ADDRESS but with http scheme like https://amethyst.teal.fm
+26-2
README.md
···25Open 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`.
262728-### Hosting the aqua appview in docker locally
29-notes for caddy and cloud flare tunnel https://caddy.community/t/caddy-with-cloudflare-tunnel/18569000000000000000000000000
···25Open 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`.
262728+### Running the full stack in docker for development
29+_Still a work in progress and may have some hiccups_
30+31+#### 1. Set up publicly accessible endpoints.
32+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:
33+34+* Set up the traditional port forward on your router
35+* 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).
36+37+If you do the cloudflare tunnels for amethyst as well,
38+you will also need
39+to follow [this](https://caddy.community/t/caddy-with-cloudflare-tunnel/18569) for routing to work properly.
40+Although you can just run it locally and it will work.
41+42+#### 2. Set up .envs
43+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.
44+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`
45+46+#### 3. Run docker
47+1. Make sure docker and docker compose is installed
48+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.
49+3. Run `docker compose -f compose.dev.yml up -d`
50+51+52+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.
53+
···77 depends_on:
78 - postgres
79 piper:
80-# image: ghcr.io/teal-fm/piper:main
81- image: fatfingers23/piper:latest
82 # Depends on your .env.air
83 ports:
84 - "8080:8080"
···86 - .env.air
87 volumes:
88 - piper_data:/db
89-90-# db-migrations
91- #TODO to not forget to add an image to run db migrations or add it to aqua in a bash script on run
92networks:
93 app_network:
94 driver: bridge