-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
69 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,76 @@ | ||
version: "3" | ||
services: | ||
# MemberMatters | ||
membermatters: | ||
image: membermatters/membermatters:celery | ||
mm-postgres: | ||
image: postgres:15.3-alpine | ||
restart: always | ||
environment: | ||
PORTAL_ENV: "Production" | ||
MM_REDIS_HOST: 'redis://membermatters-redis:6379/0' | ||
volumes: | ||
- ./:/usr/src/data | ||
- POSTGRES_USER=membermatters | ||
- POSTGRES_PASSWORD=membermatters | ||
- POSTGRES_DB=membermatters | ||
ports: | ||
- "8000:8000" | ||
- "5432:5432" | ||
volumes: | ||
- mm-postgres-volume:/var/lib/postgresql/data | ||
healthcheck: | ||
test: ["CMD-SHELL", "pg_isready -U membermatters"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 5 | ||
|
||
# MemberMatters Redis | ||
membermatters-redis: | ||
mm-redis: | ||
image: redis | ||
restart: always | ||
depends_on: | ||
- membermatters | ||
- mm-postgres | ||
|
||
# MemberMatters | ||
mm-webapp: | ||
image: membermatters/membermatters | ||
restart: always | ||
environment: | ||
MM_ENV: "Production" | ||
MM_SECRET_KEY: "CHANGE_ME" | ||
MM_USE_POSTGRES: True | ||
MM_REDIS_HOST: "redis://mm-redis:6379/0" | ||
ports: | ||
- "8000:8000" | ||
depends_on: | ||
- mm-postgres | ||
- mm-redis | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:8000"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 15 | ||
|
||
# MemberMatters Celery Worker | ||
membermatters-celery-worker: | ||
image: membermatters/membermatters:celery | ||
mm-celery-worker: | ||
image: membermatters/membermatters | ||
restart: always | ||
environment: | ||
PORTAL_ENV: "Production" | ||
MM_ENV: "Production" | ||
MM_USE_POSTGRES: True | ||
MM_RUN_MODE: "celery_worker" | ||
MM_REDIS_HOST: 'redis://membermatters-redis:6379/0' | ||
volumes: | ||
- ./:/usr/src/data | ||
MM_REDIS_HOST: "redis://mm-redis:6379/0" | ||
depends_on: | ||
- membermatters | ||
- membermatters-redis | ||
- mm-webapp | ||
- mm-redis | ||
|
||
# MemberMatters Celery Worker | ||
membermatters-celery-beat: | ||
image: membermatters/membermatters:celery | ||
# MemberMatters Celery Beat | ||
mm-celery-beat: | ||
image: membermatters/membermatters | ||
restart: always | ||
environment: | ||
PORTAL_ENV: "Production" | ||
MM_ENV: "Production" | ||
MM_USE_POSTGRES: True | ||
MM_RUN_MODE: "celery_beat" | ||
MM_REDIS_HOST: 'redis://membermatters-redis:6379/0' | ||
volumes: | ||
- ./:/usr/src/data | ||
MM_REDIS_HOST: "redis://mm-redis:6379/0" | ||
depends_on: | ||
- membermatters | ||
- membermatters-celery-worker | ||
- membermatters-redis | ||
- mm-webapp | ||
- mm-celery-worker | ||
- mm-redis | ||
|
||
volumes: | ||
mm-postgres-volume: | ||
driver: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,19 @@ docker stop membermatters | |
docker restart membermatters | ||
``` | ||
|
||
Once your container is running, you will be able to login with the default admin account details: | ||
Once your container is running, you will probably want to load the initial database fixtures so there's an account you can use to login with. To do so, connect to your running docker container: | ||
|
||
```bash | ||
docker exec -it membermatters bash | ||
``` | ||
|
||
and run the following: | ||
|
||
```bash | ||
python3 manage.py loaddata initial | ||
``` | ||
|
||
Once you've loaded the initial fixtures, you will be able to login with the default admin account details: | ||
|
||
``` | ||
Email: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters