Skip to content

Commit d10df03

Browse files
author
zmrenwu
committed
修改 docker-compose 配置(重命名服务、镜像和容器)
1 parent d5c6086 commit d10df03

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

local.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ volumes:
55
esdata_local:
66

77
services:
8-
hellodjango_blog_tutorial_local:
8+
hellodjango.rest.framework.tutorial.local:
99
build:
1010
context: .
1111
dockerfile: ./compose/local/Dockerfile
12-
image: hellodjango_blog_tutorial_local
13-
container_name: hellodjango_blog_tutorial_local
12+
image: hellodjango_rest_framework_tutorial_local
13+
container_name: hellodjango_rest_framework_tutorial_local
1414
working_dir: /app
1515
volumes:
1616
- database_local:/app/database
@@ -19,14 +19,14 @@ services:
1919
- "8000:8000"
2020
command: /start.sh
2121
depends_on:
22-
- elasticsearch_local
22+
- elasticsearch.local
2323

24-
elasticsearch_local:
24+
elasticsearch.local:
2525
build:
2626
context: .
2727
dockerfile: ./compose/production/elasticsearch/Dockerfile
28-
image: hellodjango_blog_tutorial_elasticsearch_local
29-
container_name: hellodjango_blog_tutorial_elasticsearch_local
28+
image: hellodjango_rest_framework_tutorial_elasticsearch_local
29+
container_name: hellodjango_rest_framework_tutorial_elasticsearch_local
3030
volumes:
3131
- esdata_local:/usr/share/elasticsearch/data
3232
ports:

production.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ volumes:
66
esdata:
77

88
services:
9-
hellodjango_blog_tutorial:
9+
hellodjango.rest.framework.tutorial:
1010
build:
1111
context: .
1212
dockerfile: compose/production/django/Dockerfile
13-
image: hellodjango_blog_tutorial
14-
container_name: hellodjango_blog_tutorial
13+
image: hellodjango_rest_framework_tutorial
14+
container_name: hellodjango_rest_framework_tutorial
1515
working_dir: /app
1616
volumes:
1717
- database:/app/database
@@ -21,13 +21,15 @@ services:
2121
ports:
2222
- "8000:8000"
2323
command: /start.sh
24+
depends_on:
25+
- elasticsearch.local
2426

2527
nginx:
2628
build:
2729
context: .
2830
dockerfile: compose/production/nginx/Dockerfile
29-
image: hellodjango_blog_tutorial_nginx
30-
container_name: hellodjango_blog_tutorial_nginx
31+
image: hellodjango_rest_framework_tutorial_nginx
32+
container_name: hellodjango_rest_framework_tutorial_nginx
3133
volumes:
3234
- static:/apps/hellodjango_blog_tutorial/static
3335
ports:
@@ -38,8 +40,8 @@ services:
3840
build:
3941
context: .
4042
dockerfile: ./compose/production/elasticsearch/Dockerfile
41-
image: hellodjango_blog_tutorial_elasticsearch
42-
container_name: hellodjango_blog_tutorial_elasticsearch
43+
image: hellodjango_rest_framework_tutorial_elasticsearch
44+
container_name: hellodjango_rest_framework_tutorial_elasticsearch
4345
volumes:
4446
- esdata:/usr/share/elasticsearch/data
4547
ports:

0 commit comments

Comments
 (0)