|
@@ -8,16 +8,16 @@ services:
|
|
|
hoppscotch-backend:
|
|
|
container_name: hoppscotch-backend
|
|
|
build:
|
|
|
- dockerfile: packages/hoppscotch-backend/Dockerfile
|
|
|
+ dockerfile: prod.Dockerfile
|
|
|
context: .
|
|
|
- target: prod
|
|
|
+ target: backend
|
|
|
env_file:
|
|
|
- ./.env
|
|
|
restart: always
|
|
|
environment:
|
|
|
# Edit the below line to match your PostgresDB URL if you have an outside DB (make sure to update the .env file as well)
|
|
|
- DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300
|
|
|
- - PORT=3000
|
|
|
+ - PORT=3170
|
|
|
volumes:
|
|
|
# Uncomment the line below when modifying code. Only applicable when using the "dev" target.
|
|
|
# - ./packages/hoppscotch-backend/:/usr/src/app
|
|
@@ -26,7 +26,7 @@ services:
|
|
|
hoppscotch-db:
|
|
|
condition: service_healthy
|
|
|
ports:
|
|
|
- - "3170:3000"
|
|
|
+ - "3170:3170"
|
|
|
|
|
|
# The main hoppscotch app. This will be hosted at port 3000
|
|
|
# NOTE: To do TLS or play around with how the app is hosted, you can look into the Caddyfile for
|
|
@@ -34,8 +34,9 @@ services:
|
|
|
hoppscotch-app:
|
|
|
container_name: hoppscotch-app
|
|
|
build:
|
|
|
- dockerfile: packages/hoppscotch-selfhost-web/Dockerfile
|
|
|
+ dockerfile: prod.Dockerfile
|
|
|
context: .
|
|
|
+ target: app
|
|
|
env_file:
|
|
|
- ./.env
|
|
|
depends_on:
|
|
@@ -49,8 +50,9 @@ services:
|
|
|
hoppscotch-sh-admin:
|
|
|
container_name: hoppscotch-sh-admin
|
|
|
build:
|
|
|
- dockerfile: packages/hoppscotch-sh-admin/Dockerfile
|
|
|
+ dockerfile: prod.Dockerfile
|
|
|
context: .
|
|
|
+ target: sh_admin
|
|
|
env_file:
|
|
|
- ./.env
|
|
|
depends_on:
|
|
@@ -58,6 +60,23 @@ services:
|
|
|
ports:
|
|
|
- "3100:8080"
|
|
|
|
|
|
+ # The service that spins up all 3 services at once in one container
|
|
|
+ hoppscotch-aio:
|
|
|
+ container_name: hoppscotch-aio
|
|
|
+ build:
|
|
|
+ dockerfile: prod.Dockerfile
|
|
|
+ context: .
|
|
|
+ target: aio
|
|
|
+ env_file:
|
|
|
+ - ./.env
|
|
|
+ depends_on:
|
|
|
+ hoppscotch-db:
|
|
|
+ condition: service_healthy
|
|
|
+ ports:
|
|
|
+ - "3000:3000"
|
|
|
+ - "3100:3100"
|
|
|
+ - "3170:3170"
|
|
|
+
|
|
|
# The preset DB service, you can delete/comment the below lines if
|
|
|
# you are using an external postgres instance
|
|
|
# This will be exposed at port 5432
|
|
@@ -73,9 +92,59 @@ services:
|
|
|
POSTGRES_PASSWORD: testpass
|
|
|
POSTGRES_DB: hoppscotch
|
|
|
healthcheck:
|
|
|
- test: ["CMD-SHELL", "sh -c 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'"]
|
|
|
+ test:
|
|
|
+ [
|
|
|
+ "CMD-SHELL",
|
|
|
+ "sh -c 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'"
|
|
|
+ ]
|
|
|
interval: 5s
|
|
|
timeout: 5s
|
|
|
retries: 10
|
|
|
|
|
|
+ # All the services listed below are deprececated
|
|
|
+ hoppscotch-old-backend:
|
|
|
+ container_name: hoppscotch-old-backend
|
|
|
+ build:
|
|
|
+ dockerfile: packages/hoppscotch-backend/Dockerfile
|
|
|
+ context: .
|
|
|
+ target: prod
|
|
|
+ env_file:
|
|
|
+ - ./.env
|
|
|
+ restart: always
|
|
|
+ environment:
|
|
|
+ # Edit the below line to match your PostgresDB URL if you have an outside DB (make sure to update the .env file as well)
|
|
|
+ - DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300
|
|
|
+ - PORT=3000
|
|
|
+ volumes:
|
|
|
+ # Uncomment the line below when modifying code. Only applicable when using the "dev" target.
|
|
|
+ # - ./packages/hoppscotch-backend/:/usr/src/app
|
|
|
+ - /usr/src/app/node_modules/
|
|
|
+ depends_on:
|
|
|
+ hoppscotch-db:
|
|
|
+ condition: service_healthy
|
|
|
+ ports:
|
|
|
+ - "3170:3000"
|
|
|
+
|
|
|
+ hoppscotch-old-app:
|
|
|
+ container_name: hoppscotch-old-app
|
|
|
+ build:
|
|
|
+ dockerfile: packages/hoppscotch-selfhost-web/Dockerfile
|
|
|
+ context: .
|
|
|
+ env_file:
|
|
|
+ - ./.env
|
|
|
+ depends_on:
|
|
|
+ - hoppscotch-old-backend
|
|
|
+ ports:
|
|
|
+ - "3000:8080"
|
|
|
|
|
|
+ hoppscotch-old-sh-admin:
|
|
|
+ container_name: hoppscotch-old-sh-admin
|
|
|
+ build:
|
|
|
+ dockerfile: packages/hoppscotch-sh-admin/Dockerfile
|
|
|
+ context: .
|
|
|
+ env_file:
|
|
|
+ - ./.env
|
|
|
+ depends_on:
|
|
|
+ - hoppscotch-old-backend
|
|
|
+ ports:
|
|
|
+ - "3100:8080"
|