Compare commits
No commits in common. "862216082bd6a9831f9f39bebe293a2d97a5c776" and "7018a40c44a17147cb8e863e0c63489581dba09a" have entirely different histories.
862216082b
...
7018a40c44
5 changed files with 23 additions and 37 deletions
|
@ -1,2 +1 @@
|
|||
TAG=0.0.1
|
||||
ORIGIN=https://pianello.webdeploy.it
|
||||
TAG=0.0.1
|
|
@ -1,27 +1,18 @@
|
|||
pipeline:
|
||||
build_and_deploy:
|
||||
build:
|
||||
image: alpine:3.14
|
||||
secrets: [docker_password, docker_username]
|
||||
commands:
|
||||
- apk add --no-cache openssh docker docker-compose jq
|
||||
################### Provisioning
|
||||
- echo "$${DOCKER_PASSWORD}" | docker login --password-stdin --username "$${DOCKER_USERNAME}" git.webdeploy.it
|
||||
# Install deps
|
||||
- apk add docker docker-compose jq
|
||||
# Log into docker registry
|
||||
- echo "$${DOCKER_PASSWORD}" | docker login --password-stdin --username "$${DOCKER_USERNAME}" git.webdeploy.it
|
||||
- echo "TAG=$(jq -r .version ./package.json)" >> .env
|
||||
- echo "ORIGIN=https://pianello.webdeploy.it" >> .env
|
||||
- docker-compose -f docker-compose.build.yml build
|
||||
- docker push git.webdeploy.it/pianello/frontend:latest
|
||||
- docker push git.webdeploy.it/pianello/frontend:$(jq -r .version ./package.json)
|
||||
# DEPLOY STUFF
|
||||
# - eval $(ssh-agent -s)
|
||||
# - mkdir -p ~/.ssh
|
||||
# - printf "%s" "$${RUNNER_PRIVATE_KEY}" > ~/.ssh/id_ed25519
|
||||
# - chmod 600 ~/.ssh/id_ed25519
|
||||
# - ssh-add ~/.ssh/id_ed25519
|
||||
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||
# - cat .env | ssh theater@prev.theater.webdeploy.it -p 11122 "cat - > .env" # copy env
|
||||
# - cat docker-compose.prod.yml | ssh theater@prev.theater.webdeploy.it -p 11122 "cat - > docker-compose.yml && docker compose pull && docker compose stop && docker compose up -d --remove-orphans" # start docker compose
|
||||
|
||||
# Build image
|
||||
- docker-compose -f docker-compose.build.yml build
|
||||
- docker push git.webdeploy.it/pianello/pianello-web-app:latest
|
||||
- docker push git.webdeploy.it/pianello/pianello-web-app:$(jq -r .version ./package.json)
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
branches: main
|
||||
branches: main
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
frontend:
|
||||
image: git.webdeploy.it/pianello/frontend
|
||||
pianello-web-app:
|
||||
image: git.webdeploy.it/pianello/pianello-web-app
|
||||
restart: always
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
|
||||
version_tag:
|
||||
extends: frontend
|
||||
image: git.webdeploy.it/pianello/frontend:${TAG}
|
||||
|
||||
extends: pianello-web-app
|
||||
image: git.webdeploy.it/pianello/pianello-web-app:${TAG}
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
version: '3.7'
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
frontend:
|
||||
image: git.webdeploy.it/pianello/frontend:latest
|
||||
web-app:
|
||||
image: git.webdeploy.it/pianello/pianello-web-app:latest
|
||||
restart: always
|
||||
environment:
|
||||
ORIGIN: "${ORIGIN}"
|
||||
PORT: 8000
|
||||
BODY_SIZE_LIMIT: 0
|
||||
container_name: pianello-web-app
|
||||
ports:
|
||||
- 127.0.0.1:8000:8000
|
||||
- 127.0.0.1:8080:80
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"name": "frontend",
|
||||
"name": "pianello-web-app",
|
||||
"private": true,
|
||||
"version": "0.5.0",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --host 0.0.0.0",
|
||||
"build": "vite build"
|
||||
"build": "vite build && ./build-sw.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vite": "^4.4.2",
|
||||
|
|
Loading…
Reference in a new issue