Simplify deployment workflow

This commit is contained in:
Rafael Caricio 2023-04-26 12:54:48 +02:00
parent 1e40a42524
commit 0d77557ad6
Signed by: rafaelcaricio
GPG key ID: 3C86DBCE8E93C947
3 changed files with 46 additions and 0 deletions

21
.dockerignore Normal file
View file

@ -0,0 +1,21 @@
# flyctl launch added from .gitignore
**/.env.local
**/config.yaml
target
# other things
docs/*
fedimovies-*
scripts/*
src/*
# flyctl launch added from .idea/.gitignore
# Default ignored files
.idea/shelf
.idea/workspace.xml
# Editor-based HTTP Client requests
.idea/httpRequests
# Datasource local storage ignored files
.idea/dataSources
.idea/dataSources.local.xml
fly.toml

16
contrib/Dockerfile Normal file
View file

@ -0,0 +1,16 @@
FROM ubuntu:23.04
RUN apt-get update && apt-get install -y \
curl \
wget \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/lib/data
COPY build/fedimovies /usr/local/bin
COPY build/fedimoviesctl /usr/local/bin
COPY secret/fedimovies.conf /etc/fedimovies.conf
COPY files /www/frontend/
CMD ["/usr/local/bin/fedimovies"]

9
justfile Normal file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env -S just --justfile
build-release:
cargo build --release --target x86_64-unknown-linux-gnu
cp target/x86_64-unknown-linux-gnu/release/fedimovies build/fedimovies
cp target/x86_64-unknown-linux-gnu/release/fedimoviesctl build/fedimoviesctl
deploy: build-release
fly deploy