Skip to content

Commit db1acb0

Browse files
authored
fix: use hostnames instead of container names (#1880)
1 parent c0881e4 commit db1acb0

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "Node.js & PostgreSQL",
44
"dockerComposeFile": "docker-compose.yml",
5-
"service": "app",
5+
"service": "core",
66
"workspaceFolder": "/workspace",
77
// Set *default* container specific settings.json values on container create.
88
"customizations": {

.devcontainer/docker-compose.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: '3'
22

33
services:
4-
app:
5-
container_name: graasp-core
4+
core:
5+
hostname: core
66
build:
77
context: .
88
dockerfile: Dockerfile
@@ -43,7 +43,7 @@ services:
4343
# the Localstack config is set by the "localstack" service below
4444
S3_FILE_ITEM_HOST: http://localstack:4566
4545
# the Iframely config is set by the "iframely" service below
46-
EMBEDDED_LINK_ITEM_IFRAMELY_HREF_ORIGIN: http://graasp-iframely:8061
46+
EMBEDDED_LINK_ITEM_IFRAMELY_HREF_ORIGIN: http://iframely:8061
4747

4848
volumes:
4949
- ..:/workspace:cached
@@ -54,7 +54,7 @@ services:
5454
- 3000:3000
5555

5656
db:
57-
container_name: db
57+
hostname: db
5858
image: postgres:15.8-alpine
5959
restart: on-failure
6060
ports:
@@ -73,12 +73,12 @@ services:
7373
retries: 5
7474

7575
redis:
76-
container_name: graasp-redis
76+
hostname: redis
7777
image: redis
7878
restart: on-failure
7979

8080
etherpad:
81-
container_name: graasp-etherpad
81+
hostname: etherpad
8282
image: etherpad/etherpad
8383
# start the server with dev API key
8484
# https://hub.docker.com/r/etherpad/etherpad/dockerfile
@@ -105,7 +105,7 @@ services:
105105
- db
106106

107107
meilisearch:
108-
container_name: graasp-meilisearch
108+
hostname: meilisearch
109109
image: getmeili/meilisearch:v1.8
110110
restart: on-failure
111111
environment:
@@ -121,7 +121,7 @@ services:
121121
- ./meilisearch_data:/meili_data
122122

123123
umami:
124-
container_name: umami
124+
hostname: umami
125125
image: ghcr.io/umami-software/umami:postgresql-latest
126126
environment:
127127
DATABASE_URL: postgresql://umami:umami@db:5432/umami
@@ -141,7 +141,7 @@ services:
141141

142142
# Localstack is used to test aws services locally
143143
localstack:
144-
container_name: graasp-localstack
144+
hostname: localstack
145145
image: localstack/localstack
146146
volumes:
147147
- ../tmp:/tmp/graasp-localstack
@@ -156,7 +156,7 @@ services:
156156
- 4566-4583:4566-4583
157157

158158
localfile:
159-
container_name: localfile
159+
hostname: localfile
160160
image: joseluisq/static-web-server:2
161161
environment:
162162
# Note: those envs are customizable but also optional
@@ -170,7 +170,7 @@ services:
170170

171171
# necessary for graasp-embedded-link-item
172172
iframely:
173-
container_name: graasp-iframely
173+
hostname: iframely
174174
image: graasp/iframely:latest
175175
environment:
176176
NODE_ENV: production # required in order for the responses to not timeout
@@ -180,15 +180,15 @@ services:
180180

181181
# necessary for validation
182182
nudenet:
183-
container_name: graasp-nudenet
183+
hostname: nudenet
184184
image: notaitech/nudenet:classifier
185185
# exposing these ports is not necessary
186186
# ports:
187187
# - 8080:8080
188188

189189
# a mock mailbox on port 1025 (web UI at http://localhost:1080)
190190
mailer:
191-
container_name: mailer
191+
hostname: mailer
192192
image: schickling/mailcatcher
193193
ports:
194194
- "1080:1080"

0 commit comments

Comments
 (0)