UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit fea65a83 authored by Patrick Tafoya's avatar Patrick Tafoya
Browse files

template updates

parent 2c431509
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,8 @@ services:
env_file:
- .env
environment:
- # container internal port (not exposed to host)
- PORT=8080
- air_wd=/app
- <<dbNameKey>>=<<projectName>>
- <<dbUserKey>>=databaseUser
......@@ -27,7 +29,7 @@ services:
condition: service_healthy
healthcheck:
# due to the way the api authorizes requests, we expect a 401
test: /opt/healthcheck/healthcheck.sh http://localhost:8000/api/docs 401
test: /opt/healthcheck/healthcheck.sh http://localhost:$$PORT/api/docs 401
timeout: 30s
retries: 10
start_period: 30s
version: "3"
services:
# backend nodejs API
<<projectName>>-be:
build:
context: .
dockerfile: Dockerfile.be.dev
container_name: <<projectName>>-be
volumes:
- ./<<projectName>>-be:/app
- /app/node_modules
user: node
command: bash -c "npm run db:migrate && npm run dev"
environment:
# container internal port (not exposed to host)
- PORT=8080
# db config
- <<dbNameKey>>=<<projectName>>
- <<dbUserKey>>=databaseUser
- <<dbPassword>>=databasePw1!
- <<dbHost>>=db
stdin_open: true
tty: true
restart: always
depends_on:
db:
condition: service_healthy
healthcheck:
test: curl -f http://localhost:$$PORT/health
timeout: 10s
retries: 5
profiles:
- local
- ""
FROM registry1.dso.mil/ironbank/opensource/nodejs/nodejs20:20.11
#set up dependencies
COPY ./<<projectName>>-api/package.json ./<<projectName>>-api/package-lock.json ./
RUN npm ci
EXPOSE 8080
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment