description | ELECTRONIC VOTE REST API CLIENT (school project) |
owner | as2023.mta5x@slmail.me |
last change | Thu, 26 Oct 2023 21:50:08 +0000 (26 18:50 -0300) |
URL | git://repo.or.cz/asis23-votoe-client.git |
https://repo.or.cz/asis23-votoe-client.git | |
push URL | ssh://repo.or.cz/asis23-votoe-client.git |
https://repo.or.cz/asis23-votoe-client.git (learn more) | |
bundle info | asis23-votoe-client.git downloadable bundles |
content tags |
Use following command to serve client's html and assets with PHP.
RESTAPI_HOST="rest.api.host.or.ip" \
RESTAPI_PORT="rest.api.port" \
php -S localhost:8080
Build (docker/container) image
docker build --rm \
--tag 'edi2/client' \
.
Run PHP server
docker run --tty --interactive --rm \
--name edi2-client \
--publish 8080:80 \
--env RESTAPI_HOST='rest.api.host.or.ip' \
--env RESTAPI_PORT='rest.api.port' \
edi2/client
Update hosts (/etc/hosts
) file with hostctl
sudo hostctl add domains edi2 api.vot.ar --ip "127.0.0.1"
sudo hostctl add domains edi2 www.vot.ar --ip "127.0.0.1"
Manually run containers
docker run --tty --interactive --rm \
--name nginx-proxy \
--publish 80:80 \
--volume /var/run/docker.sock:/tmp/docker.sock:ro \
nginxproxy/nginx-proxy:alpine
docker run --tty --interactive --rm \
--name edi2-server \
--env VIRTUAL_HOST='api.vot.ar' \
edi2/server
docker run --tty --interactive --rm \
--name edi2-client \
--env RESTAPI_HOST='api.vot.ar' \
--env RESTAPI_PORT='80' \
--env VIRTUAL_HOST='www.vot.ar' \
edi2/client
Run the project using docker compose
docker-compose up
sudo systemctl enable docker
docker-compose up --detach
6 months ago | master | logtree |