Merge branch 'main' of https://git.d-popov.com/popov/mwhitnessing
40
_deploy/deoloy.azure.prod.stage.yml
Normal file
@ -0,0 +1,40 @@
|
||||
version: "3"
|
||||
services:
|
||||
nextjs-app: # https://sofia.mwhitnessing.com/
|
||||
hostname: jwpw-app-staging # jwpw-nextjs-app-1
|
||||
image: docker.d-popov.com/jwpw:latest
|
||||
volumes:
|
||||
- /mnt/docker_volumes/pw-staging/app/public/content/uploads/:/app/public/content/uploads
|
||||
environment:
|
||||
- NODE_ENV=prod_staging
|
||||
- TZ=Europe/Sofia
|
||||
- DATABASE_URL=mysql://jwpwsofia:dwxhns9p9vp248V39xJyRthUsZ2gR9@mariadb-staging:3306/jwpwsofia
|
||||
- UPDATE_CODE_FROM_GIT=true # Set to true to pull latest code from Git
|
||||
- GIT_BRANCH=main
|
||||
- GIT_USERNAME=deploy
|
||||
- GIT_PASSWORD=L3Kr2R438u4F7
|
||||
command: sh -c " cd /app && npm install && npm run nodeenv; tail -f /dev/null"
|
||||
tty: true
|
||||
stdin_open: true
|
||||
restart: always
|
||||
# ports:
|
||||
# - "3001:3000"
|
||||
networks:
|
||||
- infrastructure_default
|
||||
mariadb:
|
||||
hostname: mariadb-staging
|
||||
image: mariadb:latest #mariadb:10.4
|
||||
volumes:
|
||||
- /mnt/docker_volumes/pw-staging/data/mysql:/var/lib/mysql
|
||||
environment:
|
||||
MARIADB_ROOT_PASSWORD: i4966cWBtP3xJ7BLsbsgo93C8Q5262
|
||||
MYSQL_ROOT_PASSWORD: i4966cWBtP3xJ7BLsbsgo93C8Q5262
|
||||
MYSQL_DATABASE: jwpwsofia
|
||||
MYSQL_USER: jwpwsofia
|
||||
MYSQL_PASSWORD: dwxhns9p9vp248V39xJyRthUsZ2gR9
|
||||
#command: ["mysqld", "--max-connections=1000", "--sql-mode=ALLOW_INVALID_DATES,ANSI_QUOTES,ERROR_FOR_DIVISION_BY_ZERO,HIGH_NOT_PRECEDENCE,IGNORE_SPACE,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION,NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_UNSIGNED_SUBTRACTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY,PIPES_AS_CONCAT,REAL_AS_FLOAT,STRICT_ALL_TABLES,STRICT_TRANS_TABLES,ANSI,DB2,MAXDB,MSSQL,MYSQL323,MYSQL40,ORACLE,POSTGRESQL,TRADITIONAL", "--wait-timeout=28800"]
|
||||
networks:
|
||||
- infrastructure_default
|
||||
networks:
|
||||
infrastructure_default:
|
||||
external: true
|
@ -13,7 +13,7 @@ services:
|
||||
#- DATABASE_URL=mysql://jwpwsofia:dwxhns9p9vp248V39xJyRthUsZ2gR9@mariadb:3306/jwpwsofia
|
||||
#- DATABASE_URL=postgres://jwpwsofia:dwxhns9p9vp248V39xJyRthUsZ2gR9@mariadb:3306/jwpwsofia
|
||||
- UPDATE_CODE_FROM_GIT=true # Set to true to pull latest code from Git
|
||||
- GIT_BRANCH=mariadb
|
||||
- GIT_BRANCH=main
|
||||
- GIT_USERNAME=deploy
|
||||
- GIT_PASSWORD=%L3Kr2R438u4F7^%40
|
||||
command: sh -c " cd /app && npm install && npm run nodeenv; tail -f /dev/null"
|
||||
|
@ -1,39 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
nextjs-app:
|
||||
image: node:20.11.0-alpine
|
||||
ports:
|
||||
- "3000:3000"
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- /mnt/docker_volumes/pw/app:/app
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=mysql://jwpwsofia:dwxhns9p9vp248V39xJyRthUsZ2gR9@mariadb:3306/jwpwsofia
|
||||
command: /bin/sh -c "npm install && npm install -g dotenv-cli next && npx prisma generate && next dev; tail -f /dev/null" # Install dependencies and start the app
|
||||
#command: sh -c " cd /app && npm run prod; tail -f /dev/null"
|
||||
#HOST: fallocate -l 1G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile && echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
|
||||
# apk add git && rm -rf /tmp/clone && git clone --depth 1 https://git.d-popov.com/popov/next-cart-app.git /tmp/clone
|
||||
# cp -R /tmp/clone/next-cart-app/* /app/
|
||||
# rm -rf /tmp/clone
|
||||
# npm cache clean --force && rm -rf /app/node_modules /app/package-lock.json
|
||||
# npm --silent --prefix /app install /app && npx --prefix /app prisma generate && npm --prefix /app run test; tail -f /dev/null
|
||||
|
||||
tty: true
|
||||
stdin_open: true
|
||||
|
||||
mariadb:
|
||||
image: mariadb:10.6
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: i4966cWBtP3xJ7BLsbsgo93C8Q5262
|
||||
MYSQL_DATABASE: jwpwsofia
|
||||
MYSQL_USER: jwpwsofia
|
||||
MYSQL_PASSWORD: dwxhns9p9vp248V39xJyRthUsZ2gR9
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- /mnt/docker_volumes/pw/data/mysql:/var/lib/mysql
|
||||
|
||||
volumes:
|
||||
nextjs-app-data:
|
||||
mysql-data:
|
@ -35,7 +35,7 @@ docker build -t docker.d-popov.com/jwpw:test -f _deploy/testBuild.Dockerfile .
|
||||
docker push docker.d-popov.com/jwpw:test
|
||||
|
||||
--LATEST/
|
||||
cd /mnt/storage/DEV/workspace/repos/git.d-popov.com/next-cart-app/next-cart-app
|
||||
cd /mnt/storage/DEV/workspace/repos/git.d-popov.com/mwhitnessing
|
||||
docker build -t docker.d-popov.com/jwpw:latest -f _deploy/prod.Dockerfile .
|
||||
docker tag docker.d-popov.com/jwpw:latest docker.d-popov.com/jwpw:0.9.95
|
||||
docker push docker.d-popov.com/jwpw:latest
|
||||
@ -175,4 +175,7 @@ npx depcheck --detailed
|
||||
#Check for Package Updates
|
||||
npm install -g npm-check-updates
|
||||
ncu
|
||||
ncu -u
|
||||
ncu -u
|
||||
|
||||
|
||||
# fix (Got an error reading communication packets) ???
|
BIN
public/content/uploads/location-1-picture1.jpg
Normal file
After Width: | Height: | Size: 468 KiB |
BIN
public/content/uploads/location-1-picture2.jpg
Normal file
After Width: | Height: | Size: 512 KiB |
BIN
public/content/uploads/location-10-picture1.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/content/uploads/location-10-picture2.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/content/uploads/location-2-picture1.jpg
Normal file
After Width: | Height: | Size: 504 KiB |
BIN
public/content/uploads/location-2-picture2.jpg
Normal file
After Width: | Height: | Size: 272 KiB |
BIN
public/content/uploads/location-3-picture1.jpg
Normal file
After Width: | Height: | Size: 414 KiB |
BIN
public/content/uploads/location-3-picture2.jpg
Normal file
After Width: | Height: | Size: 295 KiB |
BIN
public/content/uploads/location-4-picture1.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/content/uploads/location-4-picture2.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/content/uploads/location-5-picture1.jpg
Normal file
After Width: | Height: | Size: 611 KiB |
BIN
public/content/uploads/location-5-picture2.jpg
Normal file
After Width: | Height: | Size: 379 KiB |
BIN
public/content/uploads/location-6-picture1.jpg
Normal file
After Width: | Height: | Size: 709 KiB |
BIN
public/content/uploads/location-6-picture2.jpg
Normal file
After Width: | Height: | Size: 705 KiB |
BIN
public/content/uploads/location-7-picture1.jpg
Normal file
After Width: | Height: | Size: 428 KiB |
BIN
public/content/uploads/location-7-picture2.jpg
Normal file
After Width: | Height: | Size: 427 KiB |
BIN
public/content/uploads/location-8-picture1.jpg
Normal file
After Width: | Height: | Size: 344 KiB |
BIN
public/content/uploads/location-8-picture2.jpg
Normal file
After Width: | Height: | Size: 360 KiB |
BIN
public/content/uploads/location-8-picture3.jpg
Normal file
After Width: | Height: | Size: 382 KiB |
BIN
public/content/uploads/location-9-picture1.jpg
Normal file
After Width: | Height: | Size: 486 KiB |
BIN
public/content/uploads/location-9-picture2.jpg
Normal file
After Width: | Height: | Size: 474 KiB |
BIN
public/content/uploads/location-9-picture3.jpg
Normal file
After Width: | Height: | Size: 15 KiB |