deployment scripts changes. staging is now demo, production has two instances - one for staging

This commit is contained in:
Dobromir Popov
2024-03-05 22:35:49 +02:00
parent 11df60c834
commit 81f53a4ec7
5 changed files with 67 additions and 62 deletions

View File

@ -0,0 +1,39 @@
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-demo/app/public/content/uploads/:/app/public/content/uploads
environment:
- NODE_ENV=prod_staging
- TZ=Europe/Sofia
- DATABASE_URL=mysql://jwpwsofia_demo:dwxhns9p9vp248@jwpwsofia:3306/jwpwsofia_demo
- 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 && npx next build && npm run nodeenv; tail -f /dev/null"
tty: true
stdin_open: true
restart: always
networks:
- infrastructure_default
mariadb:
deploy:
replicas: 0
hostname: mariadb-demo
image: mariadb:latest #mariadb:10.4
volumes:
- /mnt/docker_volumes/pw-demo/data/mysql:/var/lib/mysql
environment:
MARIADB_ROOT_PASSWORD: i4966cWBtP3xJ7BLsbsgo93
MYSQL_ROOT_PASSWORD: i4966cWBtP3xJ7BLsbsgo93
MYSQL_DATABASE: jwpwsofia_demo
MYSQL_USER: jwpwsofia_demo
MYSQL_PASSWORD: dwxhns9p9vp248
networks:
- infrastructure_default
networks:
infrastructure_default:
external: true