Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mtproto_proxy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mtproto_proxy
Commits
8d5d0aca
Unverified
Commit
8d5d0aca
authored
Jan 23, 2019
by
Сергей Прохоров
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add dockerfile and docker instructions
parent
9e0eaa06
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
4 deletions
+43
-4
Dockerfile
Dockerfile
+26
-0
README.md
README.md
+17
-4
No files found.
Dockerfile
0 → 100644
View file @
8d5d0aca
# Based on https://github.com/erlang/docker-erlang-example
FROM
erlang:alpine
RUN
apk add
--no-cache
git
RUN
mkdir
-p
/build/mtproto_proxy
WORKDIR
/build/mtproto_proxy
COPY
src src
COPY
rebar3 rebar3
COPY
rebar.config rebar.config
COPY
rebar.lock rebar.lock
COPY
config config
RUN
rebar3 as prod release
FROM
alpine
RUN
apk add
--no-cache
openssl
&&
\
apk add
--no-cache
ncurses-libs
RUN
mkdir
-p
/opt
RUN
mkdir
-p
/var/log/mtproto-proxy
COPY
--from=0 /build/mtproto_proxy/_build/prod/rel/mtp_proxy /opt/mtp_proxy
CMD
["/opt/mtp_proxy/bin/mtp_proxy", "foreground"]
README.md
View file @
8d5d0aca
...
@@ -17,8 +17,21 @@ Features
...
@@ -17,8 +17,21 @@ Features
*
Small codebase compared to oficial one
*
Small codebase compared to oficial one
*
A lots of metrics could be exported (optional)
*
A lots of metrics could be exported (optional)
How to start - quick
How to start - docker
--------------------
---------------------
1.
Get the code
`git clone https://github.com/seriyps/mtproto_proxy.git && cd mtproto_proxy/`
2.
Copy config templates
`cp config/{vm.args.example,prod-vm.args}; cp config/{sys.config.example,prod-sys.config}`
3.
Edit configs. See
[
Settings
](
#settings
)
.
4.
Build
`docker build -t mtproto-proxy-erl .`
5.
Start
`docker run -d --network=host mtproto-proxy-erl`
Installation via docker can work well for small setups (10-20k connections), but
for more heavily-loaded setups it's recommended to install proxy directly into
your server's OS (see below).
How to start without docker - quick
-----------------------------------
```
```
sudo apt install erlang-nox erlang-dev build-essential
sudo apt install erlang-nox erlang-dev build-essential
...
@@ -33,8 +46,8 @@ sudo systemctl enable mtproto-proxy
...
@@ -33,8 +46,8 @@ sudo systemctl enable mtproto-proxy
sudo systemctl start mtproto-proxy
sudo systemctl start mtproto-proxy
```
```
How to start - detailed
How to start
without docker
- detailed
--------------------
--------------------
------------------
### Install deps (ubuntu 18.04)
### Install deps (ubuntu 18.04)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment