Skip to content

Commit 83c2222

Browse files
committed
Fix docker-compose example (environment variables)
Add dev docker-compose file Start with delete endpoint
1 parent 7607fb3 commit 83c2222

File tree

8 files changed

+34
-9
lines changed

8 files changed

+34
-9
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.2.2] - 2020-07-30
8+
### Fixed
9+
- Fixed the docker-compose.yml file with correct environment variables.
10+
11+
### Added
12+
- Added docker-compose-dev.yml for development and testing purpose.
13+
714
## [0.2.1] - 2020-07-29
815
### Fixed
916
- Remove .env file from repository

docker-compose-dev.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: "3.1"
2+
services:
3+
app:
4+
image: ambersive/print-api:latest
5+
environment:
6+
- JWT_ACTIVE=false
7+
- BASIC_ACTIVE=true
8+
- BASIC_USER=test
9+
- BASIC_SECRET=test
10+
restart: always
11+
ports:
12+
- "9005:3000"
13+
volumes:
14+
- .:/app

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ services:
33
app:
44
image: ambersive/print-api:latest
55
environment:
6-
- JWT_ACTIVE:false
7-
- BASIC_ACTIVE:true
8-
- BASIC_USER:test
9-
- BASIC_SECRET:test
6+
- JWT_ACTIVE=false
7+
- BASIC_ACTIVE=true
8+
- BASIC_USER=test
9+
- BASIC_SECRET=test
1010
restart: always
1111
ports:
1212
- "9005:3000"

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "print-api",
3-
"version": "0.1.2",
3+
"version": "0.2.2",
44
"description": "This application allows you to create pdf documents of webpages and posting them to a prefered server/endpoint.",
55
"author": "Manuel Pirker Ihl<manuel.pirker-ihl@ambersive.com>",
66
"private": true,

src/app.module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { ConfigurationModule } from './configuration/configuration.module';
1313
imports: [ConfigModule.forRoot({
1414
isGlobal: true,
1515
load: [configuration],
16+
envFilePath: ['.env']
1617
}), SystemModule, BrowserModule, ConfigurationModule],
1718
controllers: [AppController],
1819
providers: [AppService],

src/browser/browser.controller.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ export class BrowserController {
3636
}
3737
});
3838

39-
4039
result = result.map(file => {
41-
file = file.substr(0, file.length - 4);
42-
return this.signature.sign(`${req.protocol}://${req.headers.host}/api/browse/${file}`);
40+
let id = file.substr(0, file.length - 4);
41+
return {
42+
"file": file,
43+
"path": this.signature.sign(`${req.protocol}://${req.headers.host}/api/browse/${id}`),
44+
};
4345
})
4446

4547
res.status(HttpStatus.OK).json(result);

src/configuration/configuration.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default () => ({
1313
},
1414
permissions: {
1515
browseCreate: process.env.PERMISSION_BROWSE_CREATE || 'browse-create',
16+
browseDestroy: process.env.PERMISSION_BROWSE_DELETE || 'browse-delete',
1617
browseRead: process.env.PERMISSION_BROWSE_READ || 'browse-read'
1718
},
1819
browser: process.env.BROWSER_PATH || null

0 commit comments

Comments
 (0)