yolo
This commit is contained in:
@@ -34,7 +34,9 @@ RESET="\033[0m"
|
||||
|
||||
function make_env_for_docker_and_svelte
|
||||
{
|
||||
echo "Creating a new environment for docker"
|
||||
docker rm -f postgresql
|
||||
docker volume rm -f srcs_data_nest_postgresql
|
||||
echo -e "${BOLD_BLUE}Creating a new environment for docker${RESET}"
|
||||
NODE_ENV=""
|
||||
# Ask if dev or prod environment
|
||||
while [ "$NODE_ENV" != "1" ] && [ "$NODE_ENV" != "2" ]; do
|
||||
@@ -58,7 +60,7 @@ RESET="\033[0m"
|
||||
echo "REDIS_PORT=6379" >> "$ENV_FILE_DOCKER"
|
||||
echo "REDIS_PASSWORD=$(generate_password)" >> "$ENV_FILE_DOCKER"
|
||||
# Connection to 42
|
||||
echo "In the next steps, we'll need to enter the client secret and client id of the 42 api"
|
||||
echo -e "${BOLD_BLUE}In the next steps, we'll need to enter the client secret and client id of the 42 api${RESET}"
|
||||
read -p "Enter the client id of the 42 api : " CLIENT_ID
|
||||
echo "FORTYTWO_CLIENT_ID=$CLIENT_ID" >> "$ENV_FILE_DOCKER"
|
||||
read -p "Enter the client secret of the 42 api : " CLIENT_SECRET
|
||||
|
||||
@@ -22,6 +22,7 @@ services:
|
||||
COOKIE_SECRET: "${COOKIE_SECRET}"
|
||||
TWO_FACTOR_AUTHENTICATION_APP_NAME : "${TWO_FACTOR_AUTHENTICATION_APP_NAME}"
|
||||
TICKET_FOR_PLAYING_GAME_SECRET : "${TICKET_FOR_PLAYING_GAME_SECRET}"
|
||||
PORT: "${PORT}"
|
||||
volumes:
|
||||
- ./requirements/nestjs/api_back/src:/usr/app/src
|
||||
- ./requirements/nestjs/api_back/test:/usr/app/test/
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as connectRedis from 'connect-redis';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule, { cors: true });
|
||||
const port = process.env.PORT || 3001;
|
||||
const port = process.env.PORT || 3000;
|
||||
const client = redis.createClient(
|
||||
{
|
||||
socket: { host: process.env.REDIS_HOST, port: parseInt(process.env.REDIS_PORT) },
|
||||
|
||||
Reference in New Issue
Block a user