- Clone the project dev repo:
git clone https://github.com/mhshakouri/functionland.github.io.git
ORgh repo clone mhshakouri/functionland.github.io
- Switch to dev branch:
git switch dev
- Running the project:
npm i
||npm install
thennpm run dev
Current data being rendered is a set of data mocks, but for better modification experience its all actually mocked in the folder : src/lib/components/data-mocks
Static files such as images and video's refrenced in data-mocks folder are located in static
folder in the root directory.
- Install docker from this guide:
https://docs.docker.com/engine/install/ubuntu/
- Install docker-compose from this guide:
https://docs.docker.com/compose/install/
In case you need to protect the staging enviroment with an http auth protocol, generate user:pass with the following command:
echo $(htpasswd -nb user password) | sed -e s/\\$/\\$\\$/g
then copy the result in the console in docker-compose.yml
file on line 59:
- "traefik.http.middlewares.fxland-auth.basicauth.users=fxland:$$apr1$$PgKn6LCV$$MPUbn1rEw96J1iNZa2Arb." #replace generated password with your own
Just comment the lines 59 and 60 in docker-compose.yml file:
- "traefik.http.middlewares.fxland-auth.basicauth.users=fxland:$$apr1$$PgKn6LCV$$MPUbn1rEw96J1iNZa2Arb." #replace generated password with your own
- "traefik.http.routers.fxland.middlewares=fxland-auth"
You can do the same for traefik monitor dashboard on line 41 and 42, it's recommended to protect the traefik dashboard with http auth.
docker-compose.yml
Replace domain names on lines 40
and 57
, accordingly for traefik monitor dashboard, and the website.
./configs/traefik.yml
Replace domain names on lines 20
and 22
and also a valid email address at line 34
.
-
Create an .env file from the template provided in
.env.example
and provide the required keys, domain names, etc, in this.env
file. -
Prepare for ssl cert creation:
Remove ./configs/acme.json
if exists
Create new acme.json with the right permission using the following commands:
touch ./configs/acme.json
chmod 600 ./configs/acme.json
To run the container just run the following the command:
`docker-compose up -d`
docker-compose logs -f
docker-compose up -d --force-recreate
docker-compose up -d --force-recreate --build
docker-compose stop
docker-compose down -v
docker-compose up --scale fxland=2 --force-recreate --build -d
Making deploy.sh
executable (once):
chmod +x deploy.sh
Run:
./deploy.sh