Skip to content

Commit 3531610

Browse files
committed
Restore deleted development Compose files
1 parent 5a113cb commit 3531610

File tree

2 files changed

+227
-0
lines changed

2 files changed

+227
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#
2+
# This file provides a way to override personal configuration options along
3+
# with the main Compose file for local development. Docker will merge these
4+
# definitions with the main file.
5+
#
6+
# Copy: docker-compose.override.example.yml
7+
# ..to: docker-compose.override.yml
8+
#
9+
# ...and adjust services below as needed. The examples shown below are not
10+
# exhaustive.
11+
#
12+
13+
name: tdei-workspaces
14+
15+
services:
16+
frontend:
17+
# Run the container as your local user so that file permissions match.
18+
#
19+
# The default UID for MacOS is typically 501. For Linux, this is typically
20+
# 1000. Run `id -u` to confirm.
21+
#
22+
user: 501
23+
24+
tasks-backend:
25+
# Build the container as your local user so that file permissions match.
26+
#
27+
# The default UID for MacOS is typically 501. For Linux, this is typically
28+
# 1000. Run `id -u` to confirm.
29+
#
30+
build:
31+
args:
32+
APP_UID: 501

docker-compose.yml

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
#
2+
# This Compose file is designed for for local development convenience. Do not
3+
# use this configuration for production.
4+
#
5+
# To personalize these services for your particular environment and workflow,
6+
# consider writing a docker-compose.override.yml file. Check out the included
7+
# docker-compose.override.example.yml file for a starting point.
8+
#
9+
10+
name: tdei-workspaces
11+
12+
################################################################################
13+
14+
x-osm-rails-base:
15+
&osm-rails-base
16+
build:
17+
context: osm-rails
18+
env_file: .env
19+
volumes:
20+
- ./osm-rails:/app
21+
# Prevent these directories from mounting so they're not shared between
22+
# host OS and Docker:
23+
- /app/node_modules/
24+
- osm-rails-tmp:/app/tmp
25+
- osm-rails-storage:/app/storage
26+
27+
################################################################################
28+
29+
services:
30+
dev-proxy:
31+
image: traefik:latest
32+
ports:
33+
- "${WS_DEV_PORT}:80"
34+
volumes:
35+
- /var/run/docker.sock:/var/run/docker.sock:ro
36+
command:
37+
- --entrypoints.web.address=:80
38+
- --api.insecure=true
39+
- --providers.docker=true
40+
- --providers.docker.exposedbydefault=false
41+
42+
frontend:
43+
image: node:latest
44+
entrypoint: npm
45+
command: run dev
46+
user: node
47+
working_dir: /app
48+
tty: true
49+
environment:
50+
VITE_TDEI_API_URL: ${WS_TDEI_API_URL}
51+
VITE_TDEI_USER_API_URL: ${WS_TDEI_BACKEND_URL}
52+
VITE_API_URL: ${WS_API_URL}
53+
VITE_OSM_URL: ${WS_OSM_URL}
54+
VITE_RAPID_URL: ${WS_RAPID_URL}
55+
VITE_PATHWAYS_EDITOR_URL: ${WS_PATHWAYS_EDITOR_URL}
56+
volumes:
57+
- ./frontend:/app
58+
labels:
59+
- traefik.enable=true
60+
- traefik.http.routers.frontend.rule=Host(`${WS_FRONTEND_HOST}`)
61+
- traefik.http.services.frontend.loadbalancer.server.port=3000
62+
63+
#api:
64+
# Workspaces backend currently exists in the Tasking Manager backend. See
65+
# the tasks-backend service below.
66+
67+
rapid:
68+
image: node:latest
69+
entrypoint: npm
70+
command: run start
71+
user: node
72+
working_dir: /app
73+
tty: true
74+
volumes:
75+
- ./rapid:/app
76+
labels:
77+
- traefik.enable=true
78+
- traefik.http.middlewares.cors.headers.accesscontrolallowmethods=*
79+
- traefik.http.middlewares.cors.headers.accesscontrolalloworiginlist=*
80+
- traefik.http.middlewares.cors.headers.accesscontrolmaxage=100
81+
- traefik.http.middlewares.cors.headers.addvaryheader=true
82+
- traefik.http.routers.rapid.rule=Host(`${WS_RAPID_HOST}`)
83+
- traefik.http.routers.rapid.middlewares=cors
84+
- traefik.http.services.rapid.loadbalancer.server.port=8080
85+
86+
pathways-editor:
87+
image: node:latest
88+
entrypoint: npm
89+
command: run start
90+
user: node
91+
working_dir: /app
92+
tty: true
93+
volumes:
94+
- ./pathways-editor:/app
95+
labels:
96+
- traefik.enable=true
97+
- traefik.http.middlewares.cors.headers.accesscontrolallowmethods=*
98+
- traefik.http.middlewares.cors.headers.accesscontrolalloworiginlist=*
99+
- traefik.http.middlewares.cors.headers.accesscontrolmaxage=100
100+
- traefik.http.middlewares.cors.headers.addvaryheader=true
101+
- traefik.http.routers.pathways-editor.rule=Host(`${WS_PATHWAYS_EDITOR_HOST}`)
102+
- traefik.http.routers.pathways-editor.middlewares=cors
103+
- traefik.http.services.pathways-editor.loadbalancer.server.port=8080
104+
105+
osm-log-proxy:
106+
image: nginx:latest
107+
volumes:
108+
- ./nginx.debug.conf:/etc/nginx/nginx.conf:ro
109+
depends_on:
110+
- osm-web
111+
labels:
112+
- traefik.enable=true
113+
- traefik.http.routers.osm-log-proxy.rule=Host(`${WS_OSM_HOST}`)
114+
- traefik.http.services.osm-log-proxy.loadbalancer.server.port=80
115+
116+
osm-web:
117+
image: nginx:stable-alpine
118+
depends_on:
119+
- osm-rails
120+
- osm-cgimap
121+
volumes:
122+
- ./osm-web/nginx.conf:/etc/nginx/conf.d/default.conf:ro
123+
- ./osm-rails/public:/usr/share/nginx/html:ro
124+
labels:
125+
- traefik.enable=true
126+
- traefik.http.routers.osm-web.rule=Host(`${WS_OSM_HOST}`)
127+
- traefik.http.services.osm-web.loadbalancer.server.port=80
128+
129+
osm-rails:
130+
<<: *osm-rails-base
131+
command: bundle exec rails s -p 3000 -b '0.0.0.0'
132+
environment:
133+
PIDFILE: /tmp/pids/server.pid
134+
tmpfs: /tmp/pids/
135+
136+
osm-rails-worker:
137+
<<: *osm-rails-base
138+
command: bundle exec rake jobs:work
139+
140+
osm-cgimap:
141+
build:
142+
context: osm-cgimap
143+
dockerfile: docker/ubuntu/Dockerfile2404
144+
environment:
145+
CGIMAP_HOST: ${WS_OSM_DB_HOST}
146+
CGIMAP_USERNAME: ${WS_OSM_DB_USER}
147+
CGIMAP_PASSWORD: ${WS_OSM_DB_PASS}
148+
CGIMAP_DBNAME: ${WS_OSM_DB_NAME}
149+
CGIMAP_MAX_CHANGESET_ELEMENTS: ${WS_OSM_MAX_CHANGESET_ELEMENTS}
150+
CGIMAP_MAX_PAYLOAD: ${WS_OSM_MAX_UPLOAD_BYTES}
151+
CGIMAP_MAP_NODES: ${WS_OSM_MAX_EXPORT_NODES}
152+
CGIMAP_MAP_AREA: ${WS_OSM_MAX_EXPORT_AREA}
153+
154+
# tasks-frontend:
155+
# build:
156+
# context: tasking-manager
157+
# dockerfile: ./scripts/docker/Dockerfile.frontend
158+
# volumes:
159+
# - ./tasking-manager:/usr/src/app
160+
# labels:
161+
# - traefik.enable=true
162+
# - traefik.http.routers.tasks-frontend.rule=Host(`${WS_TASKS_HOST}`)
163+
# - traefik.http.services.tasks-frontend.loadbalancer.server.port=80
164+
165+
tasks-backend:
166+
build:
167+
context: tasking-manager
168+
dockerfile: ./scripts/docker/Dockerfile.backend
169+
target: debug
170+
args:
171+
APP_UID: 1000
172+
env_file: tasking-manager/tasking-manager.env
173+
environment:
174+
GEVENT_SUPPORT: true
175+
ports:
176+
- "5678:5678" # debugpy debugger port
177+
volumes:
178+
- ./tasking-manager:/usr/src/app
179+
labels:
180+
- traefik.enable=true
181+
- traefik.http.routers.tasks-backend.rule=Host(`${WS_TASKS_HOST}`) && PathPrefix(`/api/`)
182+
- traefik.http.routers.tasks-backend.service=tasks-backend
183+
- traefik.http.services.tasks-backend.loadbalancer.server.port=5000
184+
# Workspaces backend currently lives in the TM. Emulate a separate server for now:
185+
- traefik.http.middlewares.workspaces-backend-emulation.replacepathregex.regex=^/api/v1/(.*)
186+
- traefik.http.middlewares.workspaces-backend-emulation.replacepathregex.replacement=/api/v2/$$1/
187+
- traefik.http.routers.workspaces-backend.rule=Host(`${WS_API_HOST}`)
188+
- traefik.http.routers.workspaces-backend.service=workspaces-backend
189+
- traefik.http.services.workspaces-backend.loadbalancer.server.port=5000
190+
- traefik.http.routers.workspaces-backend.middlewares=workspaces-backend-emulation
191+
192+
volumes:
193+
osm-rails-tmp:
194+
osm-rails-storage:
195+
osm-rails-db-data:

0 commit comments

Comments
 (0)