Cookies werden für alle Subdomains gesetzt
This commit is contained in:
11
build.sh
11
build.sh
@@ -8,7 +8,6 @@ DB_NAME="main"
|
||||
DB_USER="main"
|
||||
DB_PASSWORD="hHMP8cd^N3SnzGRR"
|
||||
DB_PORT=5432
|
||||
DB_VOLUME="postgres_data"
|
||||
|
||||
git_pull_force() {
|
||||
git reset --hard HEAD
|
||||
@@ -26,13 +25,5 @@ docker stop $APP_NAME
|
||||
docker rm $APP_NAME
|
||||
docker build -t $APP_NAME .
|
||||
|
||||
|
||||
# Danach machen wir ein Backup der Datenbank, falls bei der Migration etwas schiefgehen sollte.
|
||||
cd ~/backups/
|
||||
BACKUP_FILENAME="$(date +"%Y-%m-%d_%H-%M-%S").sql.gz"
|
||||
docker exec -t $DB_CONTAINER_NAME pg_dumpall -c -U $DB_USER | gzip > $BACKUP_FILENAME
|
||||
|
||||
# Und starten unsere App wieder.
|
||||
docker run -d --name $APP_NAME --link $DB_CONTAINER_NAME -p "$APP_PORT:80" -e DB_CONNECTION=postgresql://$DB_USER:$DB_PASSWORD@${DB_CONTAINER_NAME}:$DB_PORT/$DB_NAME -e DB_PORT=$DB_PORT $APP_NAME
|
||||
|
||||
# Das Backup lassen wir da, falls irgendwas schief gehen sollte.
|
||||
docker run -d --name $APP_NAME --link $DB_CONTAINER_NAME -p "$APP_PORT:80" -e DB_CONNECTION=postgresql://$DB_USER:$DB_PASSWORD@${DB_CONTAINER_NAME}:$DB_PORT/$DB_NAME -e DB_PORT=$DB_PORT $APP_NAME
|
||||
@@ -8,8 +8,7 @@ services:
|
||||
- db
|
||||
environment:
|
||||
PORT: 3000
|
||||
DB_CONNECTION: "db"
|
||||
DB_PORT: 5432
|
||||
DB_CONNECTION: "postgresql://main:hHMP8cd^N3SnzGRR@database:5432/main"
|
||||
NODE_ENV: "development"
|
||||
ports:
|
||||
- 3000:3000
|
||||
|
||||
@@ -17,8 +17,13 @@
|
||||
const json = await response.json();
|
||||
|
||||
if (json.success == true) {
|
||||
cookie.set("token", json.data.token);
|
||||
cookie.set("expires", json.data.expires);
|
||||
const options = {
|
||||
domain: ".ibcornelsen.de",
|
||||
path: "/",
|
||||
expires: json.data.expires
|
||||
}
|
||||
cookie.set("token", json.data.token, options);
|
||||
cookie.set("expires", json.data.expires, options);
|
||||
localStorage.setItem("token", json.data.token);
|
||||
localStorage.setItem("expires", json.data.expires);
|
||||
window.location.href = "/user";
|
||||
|
||||
Reference in New Issue
Block a user