-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from atlp-rwanda/187354240-ch-dockerize-bn
[finishes #187354240] setting up docker for backend
- Loading branch information
Showing
6 changed files
with
131 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Dockerfile | ||
lib-cov | ||
*.seed | ||
*.log | ||
*.csv | ||
*.dat | ||
*.out | ||
*.pid | ||
*.gz | ||
*.swp | ||
|
||
pids | ||
logs | ||
results | ||
tmp | ||
|
||
# Build | ||
public/css/main.css | ||
|
||
# Coverage reports | ||
coverage | ||
|
||
|
||
|
||
# Dependency directory | ||
node_modules | ||
bower_components | ||
|
||
# Editors | ||
.idea | ||
*.iml | ||
|
||
# OS metadata | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Ignore built ts files | ||
dist | ||
|
||
# ignore yarn.lock | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM node:21-alpine3.19 | ||
WORKDIR /app | ||
RUN apk add --no-cache git | ||
COPY package*.json /app | ||
COPY /.git /app/.git | ||
RUN npm install | ||
COPY . /app | ||
ENV PORT=3000 | ||
EXPOSE ${PORT} | ||
CMD ["npm", "run", "dev"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version: '3.9' | ||
services: | ||
backend: | ||
container_name: backend | ||
image: mavericks-backend:v1 | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- '3000:3000' | ||
environment: | ||
- DATABASE_URL=postgresql://$DEV_DB_USER:$DEV_DB_PASSWORD@db:5432/$DEV_DB_NAME | ||
depends_on: | ||
- db | ||
db: | ||
container_name: db | ||
image: postgres:latest | ||
restart: always | ||
environment: | ||
- POSTGRES_USER=$DEV_DB_USER | ||
- POSTGRES_PASSWORD=$DEV_DB_PASSWORD | ||
- POSTGRES_DB=$DEV_DB_NAME | ||
ports: | ||
- '5432:5432' | ||
volumes: | ||
- db-data:/var/lib/postgresql/data | ||
|
||
volumes: | ||
db-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const config = { | ||
clearMocks: true, | ||
collectCoverage: true, | ||
coverageDirectory: 'coverage', | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
}; | ||
exports.default = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters