Skip to content

Commit 7a1bea2

Browse files
chore: add devspace (#10)
1 parent 38636c1 commit 7a1bea2

File tree

4 files changed

+60
-3
lines changed

4 files changed

+60
-3
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,7 @@ lerna-debug.log*
3333
!.vscode/settings.json
3434
!.vscode/tasks.json
3535
!.vscode/launch.json
36-
!.vscode/extensions.json
36+
!.vscode/extensions.json
37+
38+
# Ignore DevSpace cache and log folder
39+
.devspace/

devcontainer.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
set +e # Continue on errors
3+
4+
export NODE_ENV=development
5+
if [ -f "package.json" ]; then
6+
echo "Installing NPM Dependencies"
7+
npm install --legacy-peer-deps
8+
fi
9+
10+
COLOR_BLUE="\033[0;94m"
11+
COLOR_GREEN="\033[0;92m"
12+
COLOR_RESET="\033[0m"
13+
14+
# Print useful output for user
15+
echo -e "${COLOR_BLUE}
16+
Welcome to your development container!
17+
This is how you can work with it:
18+
- Files will be synchronized between your local machine and this container
19+
- You can run any commands that you run generally to manage the application.
20+
"
21+
22+
# Set terminal prompt
23+
export PS1="\[${COLOR_BLUE}\]devspace\[${COLOR_RESET}\] ./\W \[${COLOR_BLUE}\]\\$\[${COLOR_RESET}\] "
24+
if [ -z "$BASH" ]; then export PS1="$ "; fi
25+
26+
# Include project's bin/ folder in PATH
27+
export PATH="./bin:$PATH"
28+
29+
# Open shell
30+
bash --norc

devspace.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: v2beta1
2+
name: catalog
3+
4+
pipelines:
5+
dev:
6+
run: |-
7+
ensure_pull_secrets --all
8+
start_dev app
9+
dev:
10+
app:
11+
imageSelector: ghcr.io/polyflix/catalog:main
12+
devImage: ghcr.io/loft-sh/devspace-containers/typescript:18-alpine
13+
sync:
14+
- path: ./
15+
excludePaths:
16+
- .git/
17+
uploadExcludePaths:
18+
- Dockerfile
19+
- node_modules
20+
- dist
21+
terminal:
22+
command: ./devcontainer.sh
23+
ports:
24+
- port: "9003:8080"

src/main/config/loader.config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ function loadConfig(
3939
}
4040

4141
export const ISLOCAL =
42-
process.env.NEST_PROFILE == "local" || !process.env.NEST_PROFILE;
42+
process.env.NEST_PROFILE == "dev" || !process.env.NEST_PROFILE;
4343

4444
export const loadConfiguration = (logger: LoggerService) => {
4545
let config = {};
4646

47-
const activeProfile = process.env.NEST_PROFILE || "local";
47+
const activeProfile = process.env.NEST_PROFILE || "dev";
4848
const defaultConfigurationFiles = [
4949
`${CONFIG_COMMON_FILE_NAME}.${CONFIG_FILE_EXTENSION}`,
5050
`${CONFIG_COMMON_FILE_NAME}.${activeProfile}.${CONFIG_FILE_EXTENSION}`

0 commit comments

Comments
 (0)