Merge pull request #511 from dex-ethics/docker-exec
Use `CMD exec` in Dockerfile
This commit is contained in:
@@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
* Terminate gracefully on SIGTERM (for use in Docker) - @recmo
|
||||||
|
|
||||||
## [0.3.1.0] - 2016-02-28
|
## [0.3.1.0] - 2016-02-28
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ RUN wget http://github.com/begriffs/postgrest/releases/download/v${POSTGREST_VER
|
|||||||
mv postgrest /usr/local/bin/postgrest && \
|
mv postgrest /usr/local/bin/postgrest && \
|
||||||
rm postgrest-${POSTGREST_VERSION}-ubuntu.tar.xz
|
rm postgrest-${POSTGREST_VERSION}-ubuntu.tar.xz
|
||||||
|
|
||||||
CMD postgrest postgres://${PG_ENV_POSTGRES_USER}:${PG_ENV_POSTGRES_PASSWORD}@${PG_PORT_5432_TCP_ADDR}:${PG_PORT_5432_TCP_PORT}/${PG_ENV_POSTGRES_DB} \
|
CMD exec postgrest postgres://${PG_ENV_POSTGRES_USER}:${PG_ENV_POSTGRES_PASSWORD}@${PG_PORT_5432_TCP_ADDR}:${PG_PORT_5432_TCP_PORT}/${PG_ENV_POSTGRES_DB} \
|
||||||
--port 3000 \
|
--port 3000 \
|
||||||
--schema ${POSTGREST_SCHEMA} \
|
--schema ${POSTGREST_SCHEMA} \
|
||||||
--anonymous ${POSTGREST_ANONYMOUS} \
|
--anonymous ${POSTGREST_ANONYMOUS} \
|
||||||
|
|||||||
@@ -60,10 +60,11 @@ main = do
|
|||||||
|
|
||||||
#ifndef mingw32_HOST_OS
|
#ifndef mingw32_HOST_OS
|
||||||
tid <- myThreadId
|
tid <- myThreadId
|
||||||
void $ installHandler keyboardSignal (Catch $ do
|
forM_ [sigINT, sigTERM] $ \sig ->
|
||||||
P.release pool
|
void $ installHandler sig (Catch $ do
|
||||||
throwTo tid UserInterrupt
|
P.release pool
|
||||||
) Nothing
|
throwTo tid UserInterrupt
|
||||||
|
) Nothing
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
result <- P.use pool $ do
|
result <- P.use pool $ do
|
||||||
|
|||||||
Reference in New Issue
Block a user