https://github.com/anton-johansson/server
Docker images and scripts for setting up the server.
https://github.com/anton-johansson/server
Last synced: 16 days ago
JSON representation
Docker images and scripts for setting up the server.
- Host: GitHub
- URL: https://github.com/anton-johansson/server
- Owner: anton-johansson
- License: apache-2.0
- Created: 2016-07-09T11:55:59.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-02T23:26:25.000Z (almost 8 years ago)
- Last Synced: 2025-03-26T18:03:20.275Z (2 months ago)
- Language: Nginx
- Homepage:
- Size: 52.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Server
[](https://travis-ci.org/anton-johansson/server)
[](https://raw.githubusercontent.com/anton-johansson/server/master/LICENSE)Docker images and scripts for setting up the server.
## Running
```shell
$ alias hostip="echo ''"
$ docker run --detach --restart always --name apt-repository-01 --publish 10101:80 anton-johansson/apt-repository
$ docker run --detach --restart always --name apt-repository-02 --publish 10102:80 anton-johansson/apt-repository
$ docker run --detach --restart always --name web-proxy --publish 80:80 --add-host=host:$(hostip) anton-johansson/web-proxy
```## Building
```shell
$ docker build --tag anton-johansson/apt-repository apt-repository/
$ docker build --tag anton-johansson/web-proxy web-proxy/
```## Configurations
#### IP tables
```shell
# Exceptions to default policy:
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT# Set default policies:
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
```## License
Apache License © [Anton Johansson](https://github.com/anton-johansson)