Add an env var for PORT on render

This commit is contained in:
Ryan W
2023-09-30 14:17:36 -07:00
parent a01f054cb9
commit 33ee7a0640
3 changed files with 12 additions and 1 deletions
+10
View File
@@ -78,11 +78,21 @@ docker compose up --build
DOCKER_BUILDKIT=1 docker build --tag rails-on-docker --file production.Dockerfile . --load
```
Test the image can be used and Rails starts up, use a fake key for testing purposes only:
```
docker run --rm --env SECRET_KEY_BASE=dummy rails-on-docker
```
### With legacy builder (no BuildKit)
```
docker build --tag rails-on-docker --file production.Dockerfile .
```
Test the image can be used and Rails starts up, use a fake key for testing purposes only:
```
docker run --rm --env SECRET_KEY_BASE=dummy rails-on-docker
```
## Deployment
This app can be hosted wherever Ruby is supported and PostgreSQL databases can be provisioned.
-1
View File
@@ -83,6 +83,5 @@ HEALTHCHECK --interval=5s --timeout=3s --start-period=0s --start-interval=5s --r
# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
EXPOSE 10000
# CMD ["./bin/rails", "server"]
CMD ["bundle", "exec", "puma", "-C", "config/puma.rb"]
+2
View File
@@ -17,6 +17,8 @@ services:
numInstances: 1
healthCheckPath: /up
envVars:
- key: PORT
value: 3000
- key: DATABASE_URL
fromDatabase:
name: mysite