This repo describes and helps build my webserver.
-
ubuntu (although other linux distributions should work)
-
docker
-
apache22-utils
-
static ip
-
port forwarded port 80
-
port forwarded port 443
-
domain name specified in the swarm files
-
DNS records pointing to the static ip
This repo includes multiple swarm-compose files that can be used to start up the different services in swarm mode.
Before starting, make sure that all secrets defined in the swarm files are created.
printf "value" | sudo docker secret create secret_name -The traefik password needs to be generated:
htpasswd -c -s userfile admin
sudo docker secret create traefik_users userfile The server can be setup by running the following command:
make setupFirst, to set up the registry, this will be used to build local images like databases.
make build:registryAfter the registry is set up, the images can be built and pushed:
make build:imagesThis will run all dockerfiles in the setup directory and push them to the registry.
Next, the network can be set up:
make setup:networkAfter the images are built and pushed, the stack can be initialized:
make build:stackNow that everything is set up, we can deploy the stack:
make deployServices can be updated using the following command:
make update service=service_name image=image_name version=version