working on docker images
This commit is contained in:
+2
-1
@@ -17,4 +17,5 @@ package-lock.json
|
||||
._*
|
||||
.DS_Store
|
||||
dist/
|
||||
rds-combined-ca-bundle.pem
|
||||
rds-combined-ca-bundle.pem
|
||||
docker-variables.env
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM node
|
||||
FROM node:13
|
||||
|
||||
WORKDIR /usr/app
|
||||
|
||||
|
||||
@@ -36,15 +36,14 @@ const getWebUIKey = () => {
|
||||
})
|
||||
|
||||
const port = process.env.HTTP_PORT || process.env.PORT || "3000";
|
||||
const url = "localhost";
|
||||
const url = process.env.DOCKER ? undefined : "localhost";
|
||||
|
||||
const server = http.createServer(app) as any;
|
||||
|
||||
server.listen(port, url, () => {
|
||||
|
||||
const fullURL = `http://localhost:${port!}`;
|
||||
|
||||
console.log("\nPlease Navigate To", fullURL, "To Enter Encryption Password\n")
|
||||
console.log(`\nPlease navigate to http://localhost:${port} to enter encryption key\n`)
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
app:
|
||||
container_name: mydrive-node
|
||||
restart: always
|
||||
build: .
|
||||
ports:
|
||||
- '3000:3000'
|
||||
- '8080:8080'
|
||||
env_file:
|
||||
- docker-variables.env
|
||||
links:
|
||||
- mongo
|
||||
mongo:
|
||||
container_name: mongo
|
||||
image: mongo
|
||||
ports:
|
||||
- '27017:27017'
|
||||
volumes:
|
||||
- 'mongodb_data_volume:/data/db'
|
||||
volumes:
|
||||
mongodb_data_volume:
|
||||
external: true
|
||||
@@ -43,7 +43,6 @@ export const startCreateAccount = (email, password) => {
|
||||
|
||||
return (dispatch) => {
|
||||
|
||||
|
||||
const dt = {email, password};
|
||||
axios.post(currentURL+"/user-service/create", dt).then((response) => {
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ const path = require("path");
|
||||
|
||||
module.exports = (env) => {
|
||||
|
||||
//console.log("env docker", process.env.DOCKER);
|
||||
|
||||
if (env === "test") {
|
||||
|
||||
@@ -29,6 +30,7 @@ module.exports = (env) => {
|
||||
|
||||
console.log("Loading production env variables")
|
||||
require("dotenv").config({path: ".env.production"});
|
||||
require("dotenv").config({path: "docker-variables.env"});
|
||||
}
|
||||
|
||||
console.log("env", env);
|
||||
|
||||
Reference in New Issue
Block a user