compose files for basically all apps
This commit is contained in:
40
apps/database/docker-compose.yml
Normal file
40
apps/database/docker-compose.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
### Database (./apps/database/docker-compose.yml)
|
||||
# - [ ] Create a MariaDB service
|
||||
# - [ ] Configure volumes for persistent storage of database data
|
||||
# - [ ] Set up environment variables using the new structure (../../env/${ENVIRONMENT}/database.env)
|
||||
# - [ ] Configure networking to allow connections from the backend service
|
||||
# - [ ] Set up regular backup jobs for the database
|
||||
# - [ ] Configure appropriate resource limits and restart policies
|
||||
services:
|
||||
database:
|
||||
profiles: ["all", "mariadb", "backend", "app"]
|
||||
image: mariadb:latest
|
||||
container_name: ${INFRASTRUCTURE_LABEL}-mariadb-${ENVIRONMENT}
|
||||
command: --bind-address=0.0.0.0
|
||||
hostname: ${MARIADB_HOST}
|
||||
env_file:
|
||||
- ../../env/.env.all
|
||||
- ../../env/${ENVIRONMENT:-development}/.env.database
|
||||
- ../../env/${ENVIRONMENT:-development}/.env.proxy
|
||||
environment:
|
||||
- MARIADB_USER=${MARIADB_USER}
|
||||
- MARIADB_DATABASE=${MARIADB_DATABASE}
|
||||
- MARIADB_PASSWORD=${MARIADB_PASSWORD}
|
||||
- MARIADB_ROOT_PASSWORD=root-mindboost
|
||||
volumes:
|
||||
- ../../volumes/database/mariadb:/var/lib/mysql
|
||||
networks:
|
||||
- backend
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||
interval: 10s
|
||||
retries: 3
|
||||
adminer:
|
||||
profiles: ["all", "mariadb", "backend", "app"]
|
||||
image: adminer
|
||||
container_name: local_adminer
|
||||
restart: always
|
||||
ports:
|
||||
- 8082:8080
|
||||
networks:
|
||||
- backend
|
Reference in New Issue
Block a user