Last active
July 6, 2024 03:40
-
-
Save ankurk91/aeda6722ca7b2205c4aca28b2429a0ab to your computer and use it in GitHub Desktop.
My docker compose for local development
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
version: "3" | |
services: | |
postgres16: | |
image: 'nickblah/postgis:16-postgis-3' | |
container_name: postgres-16 | |
restart: unless-stopped | |
ports: | |
- "${FORWARD_PGSQL_PORT:-5432}:5432" | |
volumes: | |
- pg-16-data:/var/lib/postgresql/data | |
healthcheck: | |
test: [ "CMD-SHELL", "pg_isready -U postgres" ] | |
environment: | |
POSTGRES_PASSWORD: '${DB_PASSWORD:-postgres}' | |
networks: | |
- docker-net | |
redis7: | |
image: 'redis:7-alpine' | |
container_name: redis-7 | |
restart: unless-stopped | |
command: ["redis-server", "--bind", "0.0.0.0", "--appendonly", "yes"] | |
ports: | |
- "${FORWARD_REDIS_PORT:-6379}:6379" | |
healthcheck: | |
test: [ "CMD", "redis-cli", "ping" ] | |
retries: 3 | |
timeout: 5s | |
volumes: | |
- redis-7-data:/data | |
networks: | |
- docker-net | |
mysql8: | |
image: 'mysql:8.4' | |
container_name: mysql-8 | |
restart: unless-stopped | |
ports: | |
- "${FORWARD_MYSQL_PORT:-3306}:3306" | |
healthcheck: | |
test: [ "CMD", "mysqladmin", "ping" ] | |
volumes: | |
- mysql-8-data:/var/lib/mysql | |
# - ./mysql:/etc/mysql/conf.d | |
environment: | |
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' | |
networks: | |
- docker-net | |
mailpit: | |
image: 'axllent/mailpit:latest' | |
container_name: mailpit | |
restart: unless-stopped | |
ports: | |
- '${FORWARD_MAILPIT_PORT:-1025}:1025' | |
- '${FORWARD_MAILPIT_UI_PORT:-8025}:8025' | |
networks: | |
- docker-net | |
minio: | |
image: 'minio/minio:latest' | |
container_name: minio | |
restart: unless-stopped | |
ports: | |
- '${FORWARD_MINIO_PORT:-9000}:9000' | |
- '${FORWARD_MINIO_CONSOLE_PORT:-8900}:8900' | |
environment: | |
MINIO_ROOT_USER: 'minioserver' | |
MINIO_ROOT_PASSWORD: '${MINIO_PASSWORD:-minioserver}' | |
volumes: | |
- 'minio-data:/data/minio' | |
networks: | |
- docker-net | |
command: minio server /data/minio --console-address ":8900" | |
healthcheck: | |
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ] | |
retries: 3 | |
timeout: 5s | |
volumes: | |
mysql-8-data: | |
pg-16-data: | |
redis-7-data: | |
minio-data: | |
networks: | |
docker-net: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reserved comment