Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker configuration for atlas-local #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ Before starting, ensure you have the following:
```yaml
services:
mongodb:
image: mongo
container_name: mongodb
image: mongodb/mongodb-atlas-local:latest
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
MONGODB_INITDB_ROOT_USERNAME: root
MONGODB_INITDB_ROOT_PASSWORD: example
```
2. Start the Docker containers:
```bash
Expand Down
4 changes: 4 additions & 0 deletions compose.override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ services:
# On Linux, you may want to comment the following line for improved performance
WATCHPACK_POLLING: "true"

mongodb:
ports:
- "27017"

###> doctrine/doctrine-bundle ###

###< doctrine/doctrine-bundle ###
Expand Down
4 changes: 0 additions & 4 deletions compose.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@ services:
build:
context: ./pwa
target: prod

database:
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
15 changes: 15 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ services:
environment:
NEXT_PUBLIC_ENTRYPOINT: http://php

db-mongodb:
# In production, you may want to use a managed database service
image: mongodb/mongodb-community-server:latest
environment:
- MONGODB_INITDB_DATABASE=api
- MONGODB_INITDB_ROOT_USERNAME=${MONGODB_USERNAME:-}
# You should definitely change the password in production
- MONGODB_INITDB_ROOT_PASSWORD=${MONGODB_PASWORD:-}
volumes:
- db-data:/data/db:rw
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/data/db:rw
ports:
- '27017:27017'

volumes:
caddy_data:
caddy_config:
Expand Down