mirror of
https://github.com/Xevion/dynamic-preauth.git
synced 2025-12-05 23:14:53 -06:00
feat: dynamically set PORT from Dockerfile, add .env.example
This commit is contained in:
14
.env.example
Normal file
14
.env.example
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# optional, used for fetching build logs, not configured automatically
|
||||||
|
RAILWAY_TOKEN=your_railway_token_here
|
||||||
|
|
||||||
|
# optional but automatically configured by Railway
|
||||||
|
# RAILWAY_PROJECT_ID=your_project_id_here
|
||||||
|
# RAILWAY_SERVICE_ID=your_service_id_here
|
||||||
|
# RAILWAY_ENVIRONMENT_ID=your_environment_id_here
|
||||||
|
# RAILWAY_DEPLOYMENT_ID=your_deployment_id_here
|
||||||
|
|
||||||
|
# optional, automatically configured by Railway
|
||||||
|
# PORT=5800
|
||||||
|
|
||||||
|
# optional, has a default you may not want
|
||||||
|
# RAILWAY_PUBLIC_DOMAIN=your-domain.railway.app
|
||||||
@@ -51,5 +51,10 @@ COPY --from=builder-demo /build/demo/target/x86_64-pc-windows-gnu/release/demo.e
|
|||||||
COPY --from=builder-demo /build/demo/target/x86_64-unknown-linux-gnu/release/demo ./demo-linux
|
COPY --from=builder-demo /build/demo/target/x86_64-unknown-linux-gnu/release/demo ./demo-linux
|
||||||
COPY --from=builder-server /build/server/target/release/dynamic-preauth ./dynamic-preauth
|
COPY --from=builder-server /build/server/target/release/dynamic-preauth ./dynamic-preauth
|
||||||
|
|
||||||
EXPOSE 5800
|
# Build-time arg for PORT, default to 5800
|
||||||
|
ARG PORT=5800
|
||||||
|
# Runtime environment var for PORT, default to build-time arg
|
||||||
|
ENV PORT=${PORT}
|
||||||
|
EXPOSE ${PORT}
|
||||||
|
|
||||||
CMD ["/app/dynamic-preauth"]
|
CMD ["/app/dynamic-preauth"]
|
||||||
Reference in New Issue
Block a user