Skip to content

Commit ea15a2b

Browse files
committed
Update docker compose names
1 parent 80e308c commit ea15a2b

File tree

2 files changed

+112
-104
lines changed

2 files changed

+112
-104
lines changed

docker-compose-dev.yml

Lines changed: 61 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,66 @@
1-
version: "3.8"
1+
# Example Dev Environment Setup
2+
3+
version: '3.8'
4+
5+
name: ls_dev
26

37
services:
4-
# Laravel App X
5-
laravel_app_x:
6-
build:
7-
context: ./src
8-
container_name: laravel_app_x
9-
restart: unless-stopped
10-
ports:
11-
- ${LARAVEL_APP_X_PORT}:8000
12-
volumes:
13-
- ./src:/var/www/html
14-
environment:
15-
RUN_LARAVEL_AUTOMATIONS: "true"
16-
command: php -S laravel_app_x:8000 -t ./public
17-
networks:
18-
- mysql_net
19-
- redis_net
20-
21-
# MySQL
22-
laravel_mysql_db:
23-
image: mysql:latest
24-
container_name: laravel_mysql_db
25-
restart: unless-stopped
26-
ports:
27-
- ${MYSQL_PORT}:3306
28-
environment:
29-
MYSQL_DATABASE: ${MYSQL_DB}
30-
ON_CREATE_DB: ${MYSQL_DB}
31-
MYSQL_USER: ${MYSQL_USER}
32-
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
33-
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
34-
networks:
35-
- mysql_net
36-
37-
# Redis
38-
laravel_redis:
39-
image: redis:alpine
40-
container_name: laravel_redis
41-
hostname: laravel_app_x
42-
restart: always
43-
ports:
44-
- ${LARAVEL_REDIS_POST}:6379
45-
networks:
46-
- redis_net
47-
48-
# MailHog Server
49-
laravel_mail_hog:
50-
image: mailhog/mailhog:latest
51-
container_name: laravel_mail_hog
52-
restart: unless-stopped
53-
ports:
54-
- 10001:1025
55-
- 10002:8025
8+
# Laravel App X
9+
laravel_app_x:
10+
build:
11+
context: ./src
12+
container_name: laravel_app_x
13+
restart: unless-stopped
14+
ports:
15+
- ${LARAVEL_APP_X_PORT}:8000
16+
volumes:
17+
- ./src:/var/www/html
18+
environment:
19+
RUN_LARAVEL_AUTOMATIONS: 'true'
20+
command: php -S laravel_app_x:8000 -t ./public
21+
networks:
22+
- mysql_net
23+
- redis_net
24+
25+
# MySQL
26+
laravel_mysql_db:
27+
image: mysql:latest
28+
container_name: laravel_mysql_db
29+
restart: unless-stopped
30+
ports:
31+
- ${MYSQL_PORT}:3306
32+
environment:
33+
MYSQL_DATABASE: ${MYSQL_DB}
34+
ON_CREATE_DB: ${MYSQL_DB}
35+
MYSQL_USER: ${MYSQL_USER}
36+
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
37+
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
38+
networks:
39+
- mysql_net
40+
41+
# Redis
42+
laravel_redis:
43+
image: redis:alpine
44+
container_name: laravel_redis
45+
hostname: laravel_app_x
46+
restart: always
47+
ports:
48+
- ${LARAVEL_REDIS_POST}:6379
49+
networks:
50+
- redis_net
51+
52+
# MailHog Server
53+
laravel_mail_hog:
54+
image: mailhog/mailhog:latest
55+
container_name: laravel_mail_hog
56+
restart: unless-stopped
57+
ports:
58+
- 10001:1025
59+
- 10002:8025
5660

5761
networks:
58-
mysql_net:
59-
driver: bridge
62+
mysql_net:
63+
driver: bridge
6064

61-
redis_net:
62-
driver: bridge
65+
redis_net:
66+
driver: bridge

docker-compose.yml

Lines changed: 51 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,58 @@
1-
version: "3.8"
1+
# Example Prod Environment Setup
2+
3+
version: '3.8'
4+
5+
name: ls_prod
26

37
services:
4-
# Laravel Starter App
5-
laravel_starter_app:
6-
image: serversideup/php:8.2-fpm-nginx
7-
container_name: laravel_starter_app
8-
stdin_open: true
9-
tty: true
10-
ports:
11-
- ${WEB_APP_PORT}:80
12-
volumes:
13-
- ./:/var/www/html
14-
environment:
15-
RUN_LARAVEL_AUTOMATIONS: "false"
16-
AUTORUN_ENABLED: "true"
17-
AUTORUN_LARAVEL_STORAGE_LINK: "false"
18-
networks:
19-
- mysql_net
20-
- redis_net
8+
# Laravel Starter App
9+
laravel_starter_app:
10+
image: serversideup/php:8.2-fpm-nginx
11+
container_name: laravel_starter_app
12+
stdin_open: true
13+
tty: true
14+
ports:
15+
- ${WEB_APP_PORT}:80
16+
volumes:
17+
- ./:/var/www/html
18+
environment:
19+
RUN_LARAVEL_AUTOMATIONS: 'false'
20+
AUTORUN_ENABLED: 'true'
21+
AUTORUN_LARAVEL_STORAGE_LINK: 'false'
22+
networks:
23+
- mysql_net
24+
- redis_net
2125

22-
# MySQL
23-
laravel_mysql_db:
24-
image: mysql:latest
25-
container_name: laravel_mysql_db
26-
restart: unless-stopped
27-
ports:
28-
- ${MYSQL_PORT}:3306
29-
environment:
30-
MYSQL_DATABASE: ${MYSQL_DB}
31-
ON_CREATE_DB: ${MYSQL_DB}
32-
MYSQL_USER: ${MYSQL_USER}
33-
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
34-
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
35-
networks:
36-
- mysql_net
26+
# MySQL
27+
laravel_mysql_db:
28+
image: mysql:latest
29+
container_name: laravel_mysql_db
30+
restart: unless-stopped
31+
ports:
32+
- ${MYSQL_PORT}:3306
33+
environment:
34+
MYSQL_DATABASE: ${MYSQL_DB}
35+
ON_CREATE_DB: ${MYSQL_DB}
36+
MYSQL_USER: ${MYSQL_USER}
37+
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
38+
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
39+
networks:
40+
- mysql_net
3741

38-
# Redis
39-
laravel_redis:
40-
image: redis:alpine
41-
container_name: laravel_redis
42-
hostname: laravel_starter_app
43-
restart: always
44-
ports:
45-
- ${LARAVEL_REDIS_POST}:6379
46-
networks:
47-
- redis_net
42+
# Redis
43+
laravel_redis:
44+
image: redis:alpine
45+
container_name: laravel_redis
46+
hostname: laravel_starter_app
47+
restart: always
48+
ports:
49+
- ${LARAVEL_REDIS_POST}:6379
50+
networks:
51+
- redis_net
4852

4953
networks:
50-
mysql_net:
51-
driver: bridge
54+
mysql_net:
55+
driver: bridge
5256

53-
redis_net:
54-
driver: bridge
57+
redis_net:
58+
driver: bridge

0 commit comments

Comments
 (0)