#!/usr/bin/env bash

set -ex

cp .env ./admin/.env
cp .env.local ./admin/.env.local
cp .env.example ./admin/.env.example

chmod +x ./admin/*.sh

docker compose pull

docker compose -p ierg_4210 up -d nginx_proxy_db
docker compose -p ierg_4210 up -d nginx_proxy

docker compose -p ierg_4210 up -d phpmyadmin
docker compose -p ierg_4210 up -d mysql
docker compose -p ierg_4210 up -d admin

docker compose -p ierg_4210 kill admin_dev
docker compose -p ierg_4210 down admin_dev
docker compose -p ierg_4210 up -d admin_dev
docker compose -p ierg_4210 exec -it admin_dev bash



docker compose -p ierg_4210 kill admin
docker compose -p ierg_4210 down admin
docker compose -p ierg_4210 up -d admin
docker compose -p ierg_4210 exec -it admin bash
