abdofarag e7f1eb1a54 Update 'docker-compose.yml' | 5 years ago | |
---|---|---|
docker-back | 5 years ago | |
docker-front | 5 years ago | |
docker-memcached | 5 years ago | |
.env-examble | 5 years ago | |
.gitignore | 5 years ago | |
LICENSE | 6 years ago | |
README.md | 5 years ago | |
clean.sh | 5 years ago | |
docker-compose.yml | 5 years ago | |
setup.sh | 5 years ago |
RUN cd /opt/ && git clone https://gogs.earthsquad.global/abdofarag/barcode-frontend-backend-docker barcode-docker
RUN cd barcode-docker
Run cp .env-examble .env
RUN ./setup.sh
It will take a while to build and deploy Docker images and build and deploy codes.
After finish deployment chack that all containers are up and running.
RUN docker ps -a
Now you can direct navigate your browser.
http://$IP_ADDR:8000/api/admin/
http://$IP_ADDR:8080/
http://$IP_ADDR:5000/
http://$IP_ADDR:5555/
backend_dev
admin
Defualt_Pass from setup.sh
admin
Defualt_Pass from setup.sh
backend
Defualt_Pass from setup.sh
When there are changes to the frontend or backend and you want to get the latest changes to your DEV-System
GIT PUSH
to whatever repository you made changescd /opt/barcode-docker
./setup.sh
If you want to reset all containers, etc.
GIT PUSH
to whatever repository you made changescd /opt/barcode-docker
./clean.sh
Then follow the steps in Chapter "Fully automated installation "Support Ubuntu server 16.04.4."Example: install docker on Ubuntu server 16.04.4.
Install Docker from Ubuntu’s repositories:
apt-get update
apt-get install -y docker.io
or install Docker CE 18.03 from Docker’s repositories for Ubuntu or Debian:
apt-get update
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable"
apt-get update && apt-get install -y docker-ce=$(apt-cache madison docker-ce | grep 18.03 | head -1 | awk '{print $3}')
Example: install docker on Ubuntu server 16.04.4.
curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-
uname -s-
uname -m-o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
git clone https://gogs.earthsquad.global/abdofarag/barcode-frontend-backend-docker barcode-docker
cd barcode-docker
docker-compose up -d --build
You have to import this sql file to your database over phpmyadmin sql console.
wget https://gogs.earthsquad.global/athos/api_test/raw/master/scanapp_master_data.sql
http://$IP_ADDR:5000/db_sql.php?db=backend_dev
Then you can run API-Test script easly.
Add code down Below to /opt/back/barcode/settings.py or /opt/back/barcode/local.py.
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': 'memcached:11211',
}
}
memcache-top --instance=127.0.0.1