Skip to content

Commit

Permalink
Expose ports for MySQL and Redis when in dev profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Austin committed Nov 29, 2024
1 parent 034ad43 commit 429d544
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ services:
- .:/var/www/html
profiles:
- dev
depends_on:
- mysql-dev
- redis-dev

horizon:
<<: *base
Expand All @@ -54,16 +57,23 @@ services:
profiles:
- !dev

redis:
redis: &redis
image: redis:7-alpine
restart: always
volumes:
- redis_data:/data
profiles:
- dev
- !dev
- with_redis

mysql:
redis-dev:
<<: *redis
ports:
- "63791:6379"
profiles:
- dev

mysql: &mysql
image: mysql:8.0
restart: always
environment:
Expand All @@ -72,9 +82,16 @@ services:
volumes:
- mysql_data:/var/lib/mysql
profiles:
- dev
- !dev
- with_mysql

mysql-dev:
<<: *mysql
ports:
- "3309:3306"
profiles:
- dev

# Volumes needed for Caddy certificates and configuration
volumes:
caddy_data:
Expand Down

0 comments on commit 429d544

Please sign in to comment.