Skip to content

Commit 6e2025d

Browse files
committed
let docker/server easily serve in production mode
For testing purposes only, you still need to add a production key in config/database.yml.
1 parent 86e631b commit 6e2025d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docker/server

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
#!/bin/bash
22

3-
exec docker/rails server -b 0.0.0.0
3+
if [[ $1 = 'production' ]]; then
4+
docker/rails assets:precompile
5+
docker-compose exec -e RAILS_SERVE_STATIC_FILES=1 app \
6+
bin/rails server -b 0.0.0.0 -e production
7+
else
8+
docker/rails server -b 0.0.0.0
9+
fi

0 commit comments

Comments
 (0)