-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathdocker-compose.staging.yml
More file actions
67 lines (48 loc) · 2.65 KB
/
docker-compose.staging.yml
File metadata and controls
67 lines (48 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
services:
scicommons-test:
container_name: scicommons-test
# Names the container 'scicommons' for easier identification.
image: ghcr.io/m2b3/scicommons-frontend:test
# Specifies the image to use for the SciCommons frontend from the GitHub Container Registry.
volumes:
- /etc/localtime:/etc/localtime:ro
# Mounts the host's time configuration to the container to sync the time.
- /var/run/docker.sock:/var/run/docker.sock:ro
# Mounts the Docker socket file to allow Traefik to interact with the container.
labels:
- 'traefik.enable=true'
# Enables Traefik for this container.
- 'traefik.http.routers.scicommons-test.entrypoints=http'
# Defines the HTTP entry point for the scicommons router.
- 'traefik.http.routers.scicommons-test.rule=Host(`test.scicommons.org`)'
# Defines the routing rule: only route traffic with the host `scicommons.org` to this container.
- 'traefik.http.middlewares.scicommons-test-https-redirect.redirectscheme.scheme=https'
# Redirects HTTP traffic to HTTPS for the SciCommons service.
- 'traefik.http.routers.scicommons-test.middlewares=scicommons-test-https-redirect'
# Applies the HTTPS redirection middleware to the SciCommons router.
- 'traefik.http.routers.scicommons-test-secure.entrypoints=https'
# Defines the HTTPS entry point for the SciCommons router.
- 'traefik.http.routers.scicommons-test-secure.rule=Host(`test.scicommons.org`)'
# Defines the routing rule for secure HTTPS requests to `scicommons.org`.
- 'traefik.http.routers.scicommons-test-secure.tls=true'
# Enables TLS (HTTPS) for the secure SciCommons route.
- 'traefik.http.routers.scicommons-test-secure.service=scicommons-test'
# Defines the service name as 'scicommons' for the secure router.
- 'traefik.http.services.scicommons-test.loadbalancer.server.port=3000'
# Specifies the port (3000) where the SciCommons frontend service is running within the container.
- 'traefik.docker.network=proxy'
# Specifies the Docker network 'proxy' for Traefik to route requests to this container.
restart: always
# Automatically restarts the container if it crashes or stops.
ports:
- 3003:3000
# Maps the host machine's port 3000 to the container's port 3000, where the SciCommons frontend service is running.
networks:
- docker_network
# Connects the container to the 'docker_network' network.
env_file:
- .env.test
networks:
docker_network:
driver: bridge
# Creates a user-defined bridge network called 'docker_network' to allow communication between containers.