Skip to content

Commit 414588d

Browse files
[Env] #1321078 - Close ports and add traefik labels
1 parent 06e693c commit 414588d

File tree

9 files changed

+38
-110
lines changed

9 files changed

+38
-110
lines changed

.github/workflows/deploy-int.yml.orig

Lines changed: 0 additions & 93 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ up: .env ## Start the docker hub in detached mode (no logs)
4242
@$(DOCKER_COMP) up --detach
4343

4444
up-connectors: .env ## Start the docker hub in detached mode with connectors conf (no logs)
45-
@$(DOCKER_COMP) -f compose.yml -f compose.override.yml -f compose.connectors.yml up --detach
45+
@$(DOCKER_COMP) -f compose.yml -f compose.override.yml -f docker/compose/compose.connectors.yml up --detach
4646

4747
start: build up ## Build and start the containers
4848

compose.override.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,3 @@ services:
5656
environment:
5757
- PUBLIC_URL=https://${SERVER_NAME:-gally.localhost}/example
5858
- REACT_APP_API_URL=https://${SERVER_NAME:-gally.localhost}/${API_ROUTE_PREFIX:-api}
59-
60-
###> doctrine/doctrine-bundle ###
61-
database:
62-
ports:
63-
- target: 5432
64-
published: 5432
65-
protocol: tcp
66-
###< doctrine/doctrine-bundle ###
67-
68-
redis:
69-
ports:
70-
- '6379:6379'

compose.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ services:
33
build:
44
context: ./docker/proxy
55
ports:
6-
- "80:80"
7-
- "443:443"
6+
- "${HTTP_PORT:-80}:80"
7+
- "${HTTPS_PORT:-443}:443"
88
volumes:
99
- ./docker/certbot/certs:/etc/nginx/certs
1010
- ./docker/certbot/www:/var/www/certbot
@@ -35,6 +35,15 @@ services:
3535
- BACKEND_PORT=80
3636
- PHP_UPSTREAM=php
3737
- VARNISH_SIZE=512M
38+
labels:
39+
- traefik.enable=true
40+
# Serve gally over http
41+
- traefik.http.routers.gally-http.rule=Host(`${SERVER_NAME:-gally.localhost}`)
42+
- traefik.http.routers.gally-http.entrypoints=http
43+
# Serve gally over https
44+
- traefik.http.routers.gally-https.rule=Host(`${SERVER_NAME:-gally.localhost}`)
45+
- traefik.http.routers.gally-https.entrypoints=https
46+
- traefik.http.routers.gally-https.tls=true
3847

3948
router:
4049
build:
@@ -148,8 +157,8 @@ services:
148157
soft: -1
149158
hard: -1
150159
ports:
151-
- 9200:9200
152-
- 9600:9600
160+
- 9200
161+
- 9600
153162
healthcheck:
154163
test: test $$(curl -uadmin:$${OPENSEARCH_INITIAL_ADMIN_PASSWORD:-!ChangeMe0!} -k --write-out %{http_code} --fail --silent --output /dev/null https://localhost:9200/_cluster/health?wait_for_status=green&timeout=5s) -eq 200
155164
interval: 10s
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Add this compose file to your docker compose command if you want to use gally to develop connector locally
12
services:
23
proxy:
34
networks:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Add this compose file to your docker compose command if you want to use gally with elasticsearch 7 (NB opensearch 2 is recommended)
12
services:
23
search:
34
build:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Add this compose file to your docker compose command if you want to use gally with elasticsearch 8 (NB opensearch 2 is recommended)
12
services:
23
search:
34
build:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Add this compose file to your docker compose command if you want to enable gpu acceleration for vector computation (WIP)
12
services:
23
search-ml:
34
build:

docker/compose/traefik.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Example file for a reverse proxy with traefik, you can run it with
2+
# "docker compose -f docker/traefik.yml up -d"
3+
# /!\ Be careful traefik will need port 80 nd 443 of your system.
4+
5+
name: reverse-proxy
6+
services:
7+
reverse-proxy:
8+
# The official v3 Traefik docker image
9+
image: traefik:v3.2
10+
# Enables the web UI and tells Traefik to listen to docker
11+
command:
12+
- "--providers.docker=true"
13+
- "--providers.docker.exposedbydefault=false"
14+
- "--entrypoints.http.address=:80"
15+
- "--entrypoints.https.address=:443"
16+
- "--api.insecure=true"
17+
network_mode: host
18+
volumes:
19+
# So that Traefik can listen to the Docker events
20+
- /var/run/docker.sock:/var/run/docker.sock

0 commit comments

Comments
 (0)