mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix env in docker compose file for dev
This commit is contained in:
@@ -73,8 +73,8 @@ EXPOSE 3003
|
||||
|
||||
|
||||
{{ if eq .Env.ENVIRONMENT "development" }}
|
||||
RUN touch /usr/src/app/.env
|
||||
RUN printenv > /usr/src/app/.env
|
||||
RUN touch /usr/src/app/dev-env/.env
|
||||
RUN printenv > /usr/src/app/dev-env/.env
|
||||
#Run the app
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
{{ else }}
|
||||
|
||||
1
Accounts/dev-env/README.md
Normal file
1
Accounts/dev-env/README.md
Normal file
@@ -0,0 +1 @@
|
||||
This is where env will be stored for the dev environment. This is where you will find the .env file when you exec into the container.
|
||||
@@ -38,7 +38,7 @@ module.exports = {
|
||||
new webpack.DefinePlugin({
|
||||
'process': {
|
||||
'env': {
|
||||
...readEnvFile('/usr/src/app/.env')
|
||||
...readEnvFile('/usr/src/app/dev-env/.env')
|
||||
}
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -70,8 +70,8 @@ EXPOSE 3009
|
||||
|
||||
{{ if eq .Env.ENVIRONMENT "development" }}
|
||||
#Run the app
|
||||
RUN touch /usr/src/app/.env
|
||||
RUN printenv > /usr/src/app/.env
|
||||
RUN touch /usr/src/app/dev-env/.env
|
||||
RUN printenv > /usr/src/app/dev-env/.env
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
{{ else }}
|
||||
# Copy app source
|
||||
|
||||
1
Dashboard/dev-env/README.md
Normal file
1
Dashboard/dev-env/README.md
Normal file
@@ -0,0 +1 @@
|
||||
This is where env will be stored for the dev environment. This is where you will find the .env file when you exec into the container.
|
||||
@@ -38,7 +38,7 @@ module.exports = {
|
||||
new webpack.DefinePlugin({
|
||||
'process': {
|
||||
'env': {
|
||||
...readEnvFile('/usr/src/app/.env')
|
||||
...readEnvFile('/usr/src/app/dev-env/.env')
|
||||
}
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -71,8 +71,8 @@ EXPOSE 3105
|
||||
EXPOSE 3106
|
||||
|
||||
{{ if eq .Env.ENVIRONMENT "development" }}
|
||||
RUN touch /usr/src/app/.env
|
||||
RUN printenv > /usr/src/app/.env
|
||||
RUN touch /usr/src/app/dev-env/.env
|
||||
RUN printenv > /usr/src/app/dev-env/.env
|
||||
#Run the app
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
{{ else }}
|
||||
|
||||
1
StatusPage/dev-env/README.md
Normal file
1
StatusPage/dev-env/README.md
Normal file
@@ -0,0 +1 @@
|
||||
This is where env will be stored for the dev environment. This is where you will find the .env file when you exec into the container.
|
||||
@@ -38,7 +38,7 @@ module.exports = {
|
||||
new webpack.DefinePlugin({
|
||||
'process': {
|
||||
'env': {
|
||||
...readEnvFile('/usr/src/app/.env')
|
||||
...readEnvFile('/usr/src/app/dev-env/.env')
|
||||
}
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -63,7 +63,7 @@ services:
|
||||
- ./Accounts:/usr/src/app
|
||||
# Use node modules of the container and not host system.
|
||||
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
||||
- /usr/src/app/.env
|
||||
- /usr/src/app/dev-env
|
||||
- /usr/src/app/node_modules/
|
||||
- ./Common:/usr/src/Common
|
||||
- ./Model:/usr/src/Model
|
||||
@@ -89,7 +89,7 @@ services:
|
||||
- ./Dashboard:/usr/src/app
|
||||
# Use node modules of the container and not host system.
|
||||
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
||||
- /usr/src/app/.env
|
||||
- /usr/src/app/dev-env
|
||||
- /usr/src/app/node_modules/
|
||||
- ./Common:/usr/src/Common
|
||||
- ./Model:/usr/src/Model
|
||||
@@ -116,7 +116,7 @@ services:
|
||||
- ./StatusPage:/usr/src/app
|
||||
# Use node modules of the container and not host system.
|
||||
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
||||
- /usr/src/app/.env
|
||||
- /usr/src/app/dev-env
|
||||
- /usr/src/app/node_modules/
|
||||
- ./Common:/usr/src/Common
|
||||
- ./Model:/usr/src/Model
|
||||
|
||||
Reference in New Issue
Block a user