Skip to content

Instantly share code, notes, and snippets.

@crufter
Last active February 11, 2018 13:25
Show Gist options
  • Save crufter/80d18c5a4764323d2c017c0a469e1460 to your computer and use it in GitHub Desktop.
Save crufter/80d18c5a4764323d2c017c0a469e1460 to your computer and use it in GitHub Desktop.
1Backend installation locally (or anywhere)

Install 1Backend with only 4 lines:

# Start mysql container. Comes with the database schema preloaded.
sudo docker run -e MYSQL_ROOT_PASSWORD=root --name 1backend-mysql -p=3306:3306 -d 1backend/mysql

# Start redis container.
sudo docker run -p=6379:6379 --name 1backend-redis -d redis redis-server --appendonly yes

# Wait a tiny bit for the MySQL and Redis containers to start up.
# Launch the 1backend server with the following command:
sudo docker run -e INTERNAL_IP=$(ip route get 8.8.8.8 | head -1 | cut -d' ' -f8) \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -p 8883:8883 --name 1backend-server 1backend/server

sudo docker run -p 4222:80 --name 1backend-frontend 1backend/frontend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment