Website für den Open Data Day 2024 in Flensburg basierend auf TailwindCSS und gebaut mit Parcel.
Clone repository and install dependencies on your local and remote machine.
sudo apt install nginx-full certbot python3 virtualenv
git clone https://github.com/oklabflensburg/oddfl.git
cd oddfl
Make sure you have node installed on your machine, then install dependencies.
pnpm install
When you want to build the project run the following command
pnpm build
When you are developing on your local machine run this command
pnpm start
To deploy your site, open nginx config on your remote machine and add this lines.
server {
# listen 443 ssl http2;
# listen [::]:443 ssl http2;
server_name opendataday-flensburg.de;
charset utf-8;
add_header Content-Security-Policy "default-src 'self' ; script-src 'self'; img-src 'self' data: ; style-src 'self' 'unsafe-inline'; font-src 'self'; worker-src 'none'; object-src 'none'";
root /opt/git/oddfl/dist;
index index.html;
location ~ /\. {
deny all;
}
location ~* \.(ico|jpg|jpeg|png|webp|svg|js|css|woff|woff2)$ {
expires 1y;
add_header Cache-Control "public, no-transform";
}
listen 80;
}
Install ssl certificates, make sure to uncomment http2
section after certbot run.
sudo certbot
Test nginx conig and start and enable nginx service on your system.
sudo nginx -t
sudo systemctl start nginx.service
sudo systemctl status nginx.service
sudo systemctl enable nginx.service