Fix docker compose services startup (#1947)

* Fix docker compose services startup

* Update changelog
pull/1952/head
Ilija Leko 2 years ago committed by GitHub
parent e32e457ff8
commit b923cf7752
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added support for the _Stripe_ checkout to the pricing page - Added support for the _Stripe_ checkout to the pricing page
### Added
- Added `depends_on` and `healthcheck` for the _Postgres_ and _Redis_ services to the `docker-compose` files (`docker-compose.yml` and `docker-compose.build.yml`)
## Unreleased
### Changed ### Changed
- Improved the management of platforms in the admin control panel - Improved the management of platforms in the admin control panel

@ -11,16 +11,31 @@ services:
REDIS_PASSWORD: ${REDIS_PASSWORD} REDIS_PASSWORD: ${REDIS_PASSWORD}
ports: ports:
- 3333:3333 - 3333:3333
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
postgres: postgres:
image: postgres:12 image: postgres:12
env_file: env_file:
- ../.env - ../.env
healthcheck:
test: ['CMD-SHELL', 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}']
interval: 10s
timeout: 5s
retries: 5
volumes: volumes:
- postgres:/var/lib/postgresql/data - postgres:/var/lib/postgresql/data
redis: redis:
image: 'redis:alpine' image: 'redis:alpine'
healthcheck:
test: ['CMD-SHELL', 'redis-cli ping | grep PONG']
interval: 10s
timeout: 5s
retries: 5
volumes: volumes:
postgres: postgres:

@ -11,16 +11,31 @@ services:
REDIS_PASSWORD: ${REDIS_PASSWORD} REDIS_PASSWORD: ${REDIS_PASSWORD}
ports: ports:
- 3333:3333 - 3333:3333
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
postgres: postgres:
image: postgres:12 image: postgres:12
env_file: env_file:
- ../.env - ../.env
healthcheck:
test: ['CMD-SHELL', 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}']
interval: 10s
timeout: 5s
retries: 5
volumes: volumes:
- postgres:/var/lib/postgresql/data - postgres:/var/lib/postgresql/data
redis: redis:
image: 'redis:alpine' image: 'redis:alpine'
healthcheck:
test: ['CMD-SHELL', 'redis-cli ping | grep PONG']
interval: 10s
timeout: 5s
retries: 5
volumes: volumes:
postgres: postgres:

Loading…
Cancel
Save