chore (dev): change web port from 3000 to an uncommon port to avoid collisions

This commit is contained in:
naskya 2024-03-04 01:43:59 +09:00
parent 421d51b34d
commit 05fa00b586
No known key found for this signature in database
GPG Key ID: 712D413B3A9FED5C
4 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
url: http://localhost:3000
port: 3000
url: http://localhost:3030
port: 3030
db:
host: db

View File

@ -9,14 +9,14 @@ services:
- db
- redis
ports:
- "3000:3000"
- "3030:3030"
networks:
- firefishnet
environment:
# Currently bug in the development env and it cannot run.
NODE_ENV: production
PGPASSWORD: password
URL: http://localhost:3000
URL: http://localhost:3030
volumes:
- ./firefish:/firefish:rw
- ./docker-entrypoint.sh:/docker-entrypoint.sh:rw

View File

@ -3,7 +3,7 @@
set -xeu
node --version
FIREFISH_URL='http://localhost:3000'
FIREFISH_URL='http://localhost:3030'
# Check Environment Initialized Flag
if [ ! -f '/.firefish_env_initialized' ]; then
@ -27,7 +27,7 @@ if [ ! -f '/.firefish_env_initialized' ]; then
cp .config/devenv.yml .config/default.yml
URL="$(echo "${FIREFISH_URL}" | sed 's#/#\\/#g')"
sed -i'.bak' "s/http:\/\/localhost:3000/${URL}/g" .config/default.yml
sed -i'.bak' "s/http:\/\/localhost:3030/${URL}/g" .config/default.yml
rm .config/defaut.yml.bak
fi

View File

@ -9,7 +9,7 @@ The Firefish repo comes with a new containerized environment to help make develo
- Latest [Docker](https://docs.docker.com/get-docker/) installation
- Alternatively, you can use [Podman](https://podman.io/docs/installation) and [Podman Compose](https://github.com/containers/podman-compose).
- The following ports are not in use
- 3000
- 3030
- 25432
- 26379
@ -17,13 +17,13 @@ The Firefish repo comes with a new containerized environment to help make develo
1. Run `git clone https://firefish.dev/firefish/firefish.git && cd firefish` to fetch needed files.
- If you don't want to clone the entire repository, you can just download the [`dev` directory](https://firefish.dev/firefish/firefish/-/tree/develop/dev) and execute `chmod +x dev/docker-entrypoint.sh`.
1. Open `dev/docker-compose.yml` and set `FIREFISH_URL` to the URL you want to use (or leave it to `http://localhost:3000`).
1. Open `dev/docker-compose.yml` and set `FIREFISH_URL` to the URL you want to use (or leave it to `http://localhost:3030`).
1. Run `docker compose --file dev/docker-compose.yml up`. This will build the environment, dependencies and prepare the needed config files.
- If you use Podman, you should run `podman-compose --file dev/docker-compose.yml up` instead.
1. Wait until the following message shows up.
```
DONE * [core boot] All workers started
DONE * [core boot] Now listening on port 3000 on https://your_firefish_url.example.com
DONE * [core boot] Now listening on port 3030 on https://your_firefish_url.example.com
```
1. A fresh Firefish environment is created on the URL you have set!