use less common port
This commit is contained in:
parent
b52fe97da3
commit
e38d780092
@ -46,11 +46,12 @@ jobs:
|
|||||||
tracker-helper:
|
tracker-helper:
|
||||||
image: gitea.futureporn.net/futureporn/tracker-helper:latest
|
image: gitea.futureporn.net/futureporn/tracker-helper:latest
|
||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- 5063:5063
|
||||||
env:
|
env:
|
||||||
WL_FIFO_PATH: /etc/opentracker/adder.fifo
|
WL_FIFO_PATH: /etc/opentracker/adder.fifo
|
||||||
WL_FILE_PATH: /etc/opentracker/whitelist
|
WL_FILE_PATH: /etc/opentracker/whitelist
|
||||||
WL_CREDENTIALS: ${{ secrets.WL_CREDENTIALS }}
|
WL_CREDENTIALS: ${{ secrets.WL_CREDENTIALS }}
|
||||||
|
WL_PORT: 5063
|
||||||
volumes:
|
volumes:
|
||||||
- /tmp/futureporn/opentracker:/etc/opentracker
|
- /tmp/futureporn/opentracker:/etc/opentracker
|
||||||
|
|
||||||
@ -74,10 +75,10 @@ jobs:
|
|||||||
# run: apt-get update && apt-get install -y iputils-ping postgresql
|
# run: apt-get update && apt-get install -y iputils-ping postgresql
|
||||||
|
|
||||||
- name: tracker-helper service check (localhost)
|
- name: tracker-helper service check (localhost)
|
||||||
run: curl http://localhost:3000/health
|
run: curl http://localhost:5063/health
|
||||||
|
|
||||||
- name: tracker-helper service check
|
- name: tracker-helper service check
|
||||||
run: curl http://tracker-helper:3000/health
|
run: curl http://tracker-helper:5063/health
|
||||||
|
|
||||||
# - name: Check opentracker pingability
|
# - name: Check opentracker pingability
|
||||||
# run: ping -c 3 opentracker
|
# run: ping -c 3 opentracker
|
||||||
|
@ -28,9 +28,6 @@
|
|||||||
"pip install -r requirements.txt"
|
"pip install -r requirements.txt"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": [
|
|
||||||
"echo \"Error: no test specified\" && exit 1"
|
|
||||||
],
|
|
||||||
"tunnel": "dotenvx run -f ./.kamal/secrets.development -- chisel client bright.fp.sbtp.xyz:9090 R:4000",
|
"tunnel": "dotenvx run -f ./.kamal/secrets.development -- chisel client bright.fp.sbtp.xyz:9090 R:4000",
|
||||||
"backup": "docker exec -t postgres_db pg_dumpall -c -U postgres > ./backups/dev_`date +%Y-%m-%d_%H_%M_%S`.sql",
|
"backup": "docker exec -t postgres_db pg_dumpall -c -U postgres > ./backups/dev_`date +%Y-%m-%d_%H_%M_%S`.sql",
|
||||||
"act": "act -W ./.gitea/workflows --secret-file .kamal/secrets.development",
|
"act": "act -W ./.gitea/workflows --secret-file .kamal/secrets.development",
|
||||||
@ -38,7 +35,8 @@
|
|||||||
"bright:compile:watch2": "cd ./apps/bright && pnpx chokidar-cli \"**/*\" -i \"deps/**\" -i \"_build/**\" -c \"mix compile --warnings-as-errors\"",
|
"bright:compile:watch2": "cd ./apps/bright && pnpx chokidar-cli \"**/*\" -i \"deps/**\" -i \"_build/**\" -c \"mix compile --warnings-as-errors\"",
|
||||||
"bright:dev": "cd ./apps/bright && dotenvx run -f ../../.kamal/secrets.development -e MIX_ENV=dev -- mix phx.server",
|
"bright:dev": "cd ./apps/bright && dotenvx run -f ../../.kamal/secrets.development -e MIX_ENV=dev -- mix phx.server",
|
||||||
"bright:test:unit:watch": "cd ./apps/bright && pnpx chokidar-cli '**/*' -i \"deps/**\" -i '_build/**' -c 'mix test --only=unit'",
|
"bright:test:unit:watch": "cd ./apps/bright && pnpx chokidar-cli '**/*' -i \"deps/**\" -i '_build/**' -c 'mix test --only=unit'",
|
||||||
"bright:act": "cd ./apps/bright && act --env MIX_ENV=test -W ./.gitea/workflows/tests.yaml --secret-file .kamal/secrets.development"
|
"bright:act": "cd ./apps/bright && act --env MIX_ENV=test -W ./.gitea/workflows/tests.yaml --secret-file .kamal/secrets.development",
|
||||||
|
"test": "act -W ./.gitea/workflows/tests.yaml --secret-file .kamal/secrets.development && beep || boop"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -35,5 +35,5 @@ COPY --from=prerelease /usr/src/app/package.json .
|
|||||||
|
|
||||||
# run the app
|
# run the app
|
||||||
USER bun
|
USER bun
|
||||||
EXPOSE 3000/tcp
|
EXPOSE 5063/tcp
|
||||||
ENTRYPOINT [ "bun", "run", "index.ts" ]
|
ENTRYPOINT [ "bun", "run", "index.ts" ]
|
@ -27,4 +27,4 @@ tracker-helper unit & integration tests are run during the docker build. That st
|
|||||||
|
|
||||||
When validating the container before pushing to production, it can be run as follows
|
When validating the container before pushing to production, it can be run as follows
|
||||||
|
|
||||||
dotenvx run -f ../../.kamal/secrets.production -- docker run -it --init --rm -p 3000:3000 -e WL_CREDENTIALS -e WL_FILE_PATH -e WL_FIFO_PATH fp/tracker-helper
|
dotenvx run -f ../../.kamal/secrets.production -- docker run -it --init --rm -p 5063:5063 -e WL_CREDENTIALS -e WL_FILE_PATH -e WL_FIFO_PATH fp/tracker-helper
|
@ -1,4 +1,4 @@
|
|||||||
import app from './app.ts'
|
import app from './app.ts'
|
||||||
|
|
||||||
const port = process.env.PORT || 3000
|
const port = process.env.WL_PORT || 5063
|
||||||
app.listen(port)
|
app.listen(port)
|
@ -17,7 +17,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docker.build": "dotenvx run -f ../../.kamal/secrets.testing -- docker build --secret id=WL_CREDENTIALS -t gitea.futureporn.net/futureporn/tracker-helper:latest .",
|
"docker.build": "dotenvx run -f ../../.kamal/secrets.testing -- docker build --secret id=WL_CREDENTIALS -t gitea.futureporn.net/futureporn/tracker-helper:latest .",
|
||||||
"docker.run": "dotenvx run -f ../../.kamal/secrets.development -- docker run -e WL_CREDENTIALS -p 3000:3000 -t gitea.futureporn.net/futureporn/tracker-helper:latest",
|
"docker.run": "dotenvx run -f ../../.kamal/secrets.development -- docker run -e WL_CREDENTIALS -p 5063:5063 -t gitea.futureporn.net/futureporn/tracker-helper:latest",
|
||||||
"docker.push": "docker push gitea.futureporn.net/futureporn/tracker-helper:latest"
|
"docker.push": "docker push gitea.futureporn.net/futureporn/tracker-helper:latest"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user