An easy solution to shop tickets
-
Clone the repository
-
Install Docker and Docker-compose:
Installing the latest stable release for Docker on Ubuntu:
sudo curl -sSL https://get.docker.com/ | sh
Installing the latest stable release for Docker-compose on Ubuntu:
- open the terminal and run:
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- apply executable permissions to the binary:
sudo chmod +x /usr/local/bin/docker-compose
- open the terminal and run:
-
cd into the repository dir created
-
run:
docker-compose up
-
open a new terminal tab and run:
docker exec -it ticket-project yarn watch-ts
The container bind mounts the host's server/src into the container's respective dir.
Now you can make changes to the typescript files inside server/src and the container will restart automatically to apply those changes.
If you don’t want to preface the docker command with sudo, create a Unix group called docker and add users to it. When the Docker daemon starts, it creates a Unix socket accessible by members of the docker group.
- Create the
docker
group:sudo groupadd docker
- Add your user to the
docker
group:sudo usermod -aG docker $USER
- Log out and log back in so that your group membership is re-evaluated.