Compare commits

...

10 Commits

Author SHA1 Message Date
Andrew Bastin
4522aeb79a chore: add healthcheck for db 2024-03-21 00:29:43 +05:30
Andrew Bastin
31a275b971 chore: remove ports 2024-03-21 00:00:58 +05:30
Andrew Bastin
9575f3c9e3 chore: update port for healthcheck 2024-03-20 23:21:42 +05:30
Andrew Bastin
89e05f501a chore: add healthcheck 2024-03-20 22:58:54 +05:30
Andrew Bastin
fd84f4e1fa chore: more changes 2024-03-20 04:10:02 +05:30
Andrew Bastin
5e84e6b479 chore: bring back port mappings 2024-03-20 02:08:18 +05:30
Andrew Bastin
cc5359b80b chore: remove port mappings 2024-03-20 01:42:58 +05:30
Andrew Bastin
96c18c0500 chore: tweak port mappings 2024-03-20 01:32:53 +05:30
Andrew Bastin
e4e0278b6a chore: update command 2024-03-19 18:09:18 +05:30
Andrew Bastin
5bf1b6942b chore: modify start command and add more ports 2024-03-19 17:54:11 +05:30

View File

@@ -1,40 +1,14 @@
# Docker Compose config used for internal test and QA deployments
# This just spins up the AIO container along with an attached DB to the standard HTTP ports with subpath access mode
# TODO: Add Healthcheck for the AIO container
# THIS IS NOT TO BE USED FOR PERSONAL DEPLOYMENTS!
# Internal Docker Compose Image used for internal testing deployments
version: "3.7"
services:
# The service that spins up all 3 services at once in one container
hoppscotch-aio:
container_name: hoppscotch-aio
restart: unless-stopped
build:
dockerfile: prod.Dockerfile
context: .
target: aio
environment:
- DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
- ENABLE_SUBPATH_BASED_ACCESS=true
depends_on:
hoppscotch-db:
condition: service_healthy
ports:
- "3080:80"
# 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
hoppscotch-db:
image: postgres:15
ports:
- "5432:5432"
user: postgres
environment:
# The default user defined by the docker image
POSTGRES_USER: postgres
# NOTE: Please UPDATE THIS PASSWORD!
POSTGRES_PASSWORD: testpass
POSTGRES_DB: hoppscotch
healthcheck:
@@ -46,3 +20,29 @@ services:
interval: 5s
timeout: 5s
retries: 10
hoppscotch-aio:
container_name: hoppscotch-aio
build:
dockerfile: prod.Dockerfile
context: .
target: aio
environment:
- DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
- ENABLE_SUBPATH_BASED_ACCESS=true
env_file:
- ./.env
depends_on:
hoppscotch-db:
condition: service_healthy
command: ["sh", "-c", "pnpm exec prisma migrate deploy && node /usr/src/app/aio_run.mjs"]
healthcheck:
test:
- CMD
- curl
- '-f'
- 'http://localhost:80'
interval: 2s
timeout: 10s
retries: 30