mirror of
https://github.com/hoppscotch/hoppscotch
synced 2024-11-21 22:50:51 +00:00
afea75694f
* refactor: slim down the backend containers * refactor: make containers run as non-root user in container * chore: correct casing for the build stage definitions * chore: remove docker compose version field as its obsolete * chore: optimise chown and chmod into the COPY command itself * chore: add package overrides for packages with reported vulns * chore: add pnpm to containers + set workdir dir to the backend project * fix: permission issues with the fe containers * chore: define env variables on AIO
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
# THIS IS NOT TO BE USED FOR PERSONAL DEPLOYMENTS!
|
|
# Internal Docker Compose Image used for internal testing deployments
|
|
|
|
services:
|
|
hoppscotch-db:
|
|
image: postgres:15
|
|
user: postgres
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: testpass
|
|
POSTGRES_DB: hoppscotch
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"sh -c 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'"
|
|
]
|
|
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
|
|
|