Minor CI update

This commit is contained in:
frikky
2022-07-22 00:39:09 +02:00
parent 285bf7d2d2
commit baa72498d2
5 changed files with 56 additions and 22 deletions
+18 -14
View File
@@ -32,18 +32,17 @@ jobs:
version: nightly version: nightly
experimental: true experimental: true
steps: steps:
- - name: Checkout
name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
-
name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v1 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -64,15 +63,20 @@ jobs:
#,linux/386 - no node image I guess? #,linux/386 - no node image I guess?
push: true push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.app }}:${{ matrix.version }} tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.app }}:${{ matrix.version }}
- name: Login to Ghcr
uses: docker/login-action@v2
with:
registry: ghcr.io
username: frikky
password: ${{ secrets.GHCR_PW }}
- name: Ghcr Build and push - name: Ghcr Build and push
id: docker_build id: docker_build
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
env: env:
BUILDX_NO_DEFAULT_LOAD: true BUILDX_NO_DEFAULT_LOAD: true
with: with:
registry: ghcr.io
username: "frikky"
password: ${{ secrets.GHCR_PW }}
context: ${{ matrix.path }}/ context: ${{ matrix.path }}/
file: ${{ matrix.path }}/Dockerfile file: ${{ matrix.path }}/Dockerfile
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
+1 -1
View File
@@ -2,7 +2,7 @@ module main
go 1.16 go 1.16
//replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi //replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
//replace github.com/frikky/go-elasticsearch => ../../../../git/go-elasticsearch //replace github.com/frikky/go-elasticsearch => ../../../../git/go-elasticsearch
+30
View File
@@ -1362,7 +1362,18 @@ func handleLogin(resp http.ResponseWriter, request *http.Request) {
} }
// FIXME - have timeout here // FIXME - have timeout here
tutorialsFinished := Userdata.PersonalInfo.Tutorials
returnValue := shuffle.HandleInfo{
Success: true,
Tutorials: tutorialsFinished,
}
loginData := `{"success": true}` loginData := `{"success": true}`
newData, err := json.Marshal(returnValue)
if err == nil {
loginData = string(newData)
}
if len(Userdata.Session) != 0 { if len(Userdata.Session) != 0 {
log.Println("[INFO] User session already exists - resetting it") log.Println("[INFO] User session already exists - resetting it")
expiration := time.Now().Add(3600 * time.Second) expiration := time.Now().Add(3600 * time.Second)
@@ -1373,7 +1384,16 @@ func handleLogin(resp http.ResponseWriter, request *http.Request) {
Expires: expiration, Expires: expiration,
}) })
returnValue.Cookies = append(returnValue.Cookies, shuffle.SessionCookie{
Key: "session_token",
Value: Userdata.Session,
Expiration: expiration.Unix(),
})
loginData = fmt.Sprintf(`{"success": true, "cookies": [{"key": "session_token", "value": "%s", "expiration": %d}]}`, Userdata.Session, expiration.Unix()) loginData = fmt.Sprintf(`{"success": true, "cookies": [{"key": "session_token", "value": "%s", "expiration": %d}]}`, Userdata.Session, expiration.Unix())
newData, err := json.Marshal(returnValue)
if err == nil {
loginData = string(newData)
}
//log.Printf("SESSION LENGTH MORE THAN 0 IN LOGIN: %s", Userdata.Session) //log.Printf("SESSION LENGTH MORE THAN 0 IN LOGIN: %s", Userdata.Session)
err = shuffle.SetSession(ctx, Userdata, Userdata.Session) err = shuffle.SetSession(ctx, Userdata, Userdata.Session)
@@ -1410,7 +1430,17 @@ func handleLogin(resp http.ResponseWriter, request *http.Request) {
return return
} }
returnValue.Cookies = append(returnValue.Cookies, shuffle.SessionCookie{
Key: "session_token",
Value: sessionToken,
Expiration: expiration.Unix(),
})
loginData = fmt.Sprintf(`{"success": true, "cookies": [{"key": "session_token", "value": "%s", "expiration": %d}]}`, sessionToken, expiration.Unix()) loginData = fmt.Sprintf(`{"success": true, "cookies": [{"key": "session_token", "value": "%s", "expiration": %d}]}`, sessionToken, expiration.Unix())
newData, err := json.Marshal(returnValue)
if err == nil {
loginData = string(newData)
}
} }
log.Printf("[INFO] %s SUCCESSFULLY LOGGED IN with session %s", data.Username, Userdata.Session) log.Printf("[INFO] %s SUCCESSFULLY LOGGED IN with session %s", data.Username, Userdata.Session)
+6 -6
View File
@@ -1,7 +1,7 @@
version: '3' version: '3'
services: services:
frontend: frontend:
build: ./frontend #build: ./frontend
image: ghcr.io/frikky/shuffle-frontend:nightly image: ghcr.io/frikky/shuffle-frontend:nightly
container_name: shuffle-frontend container_name: shuffle-frontend
hostname: shuffle-frontend hostname: shuffle-frontend
@@ -26,13 +26,13 @@ services:
networks: networks:
- shuffle - shuffle
volumes: volumes:
#- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- ${SHUFFLE_APP_HOTLOAD_LOCATION}:/shuffle-apps:z - ${SHUFFLE_APP_HOTLOAD_LOCATION}:/shuffle-apps:z
- ${SHUFFLE_FILE_LOCATION}:/shuffle-files:z - ${SHUFFLE_FILE_LOCATION}:/shuffle-files:z
#- ${SHUFFLE_OPENSEARCH_CERTIFICATE_FILE}:/shuffle-files/es_certificate #- ${SHUFFLE_OPENSEARCH_CERTIFICATE_FILE}:/shuffle-files/es_certificate
env_file: .env env_file: .env
environment: environment:
- DOCKER_HOST=tcp://docker-socket-proxy:2375 #- DOCKER_HOST=tcp://docker-socket-proxy:2375
- SHUFFLE_APP_HOTLOAD_FOLDER=/shuffle-apps - SHUFFLE_APP_HOTLOAD_FOLDER=/shuffle-apps
- SHUFFLE_FILE_LOCATION=/shuffle-files - SHUFFLE_FILE_LOCATION=/shuffle-files
restart: unless-stopped restart: unless-stopped
@@ -45,10 +45,10 @@ services:
hostname: shuffle-orborus hostname: shuffle-orborus
networks: networks:
- shuffle - shuffle
#volumes: volumes:
# - /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
environment: environment:
- DOCKER_HOST=tcp://docker-socket-proxy:2375 #- DOCKER_HOST=tcp://docker-socket-proxy:2375
- SHUFFLE_WORKER_VERSION=latest - SHUFFLE_WORKER_VERSION=latest
- ENVIRONMENT_NAME=${ENVIRONMENT_NAME} - ENVIRONMENT_NAME=${ENVIRONMENT_NAME}
- BASE_URL=http://${OUTER_HOSTNAME}:5001 - BASE_URL=http://${OUTER_HOSTNAME}:5001
+1 -1
View File
@@ -580,7 +580,7 @@ const WelcomeForm = (props) => {
<div> <div>
{isCloud ? null : {isCloud ? null :
<Typography> <Typography>
This data will be used within the product and NOT be shared unless <a href="" target="_blank" rel="norefferer">cloud synchronization</a> is configured. This data will be used within the product and NOT be shared unless <a href="https://shuffler.io/docs/organizations#cloud_synchronization" target="_blank" rel="norefferer" style={{color: "#f86a3e", textDecoration: "none"}}>cloud synchronization</a> is configured.
</Typography> </Typography>
} }
{activeStep === steps.length ? ( {activeStep === steps.length ? (