Skip to content

Commit f2732bd

Browse files
authored
Migrate to serenity (rust) (#36)
* migrate to rust * fix: add cargo install * fix: install before build * fix: leave Cargo.lock out of .gitignore * fix and optimize build * add migrations folder to docker build
1 parent 9360b2e commit f2732bd

46 files changed

Lines changed: 4032 additions & 1265 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
1-
node_modules/
2-
dist/
1+
# Include any files or directories that you don't want to be copied to your
2+
# container here (e.g., local build artifacts, temporary files, etc.).
3+
#
4+
# For more help, visit the .dockerignore file reference guide at
5+
# https://docs.docker.com/go/build-context-dockerignore/
6+
7+
**/.DS_Store
8+
**/.classpath
9+
**/.dockerignore
10+
**/.env
11+
**/.git
12+
**/.gitignore
13+
**/.project
14+
**/.settings
15+
**/.toolstarget
16+
**/.vs
17+
**/.vscode
18+
**/*.*proj.user
19+
**/*.dbmdl
20+
**/*.jfm
21+
**/charts
22+
**/docker-compose*
23+
**/compose.y*ml
24+
**/Dockerfile*
25+
**/node_modules
26+
**/npm-debug.log
27+
**/secrets.dev.yaml
28+
**/values.dev.yaml
29+
/bin
30+
/target
31+
LICENSE
332
README.md
4-
.env

.env.sample

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
APPLICATION_ID=
22
DISCORD_TOKEN=
33
GUILD_ID=
4-
PG_HOST=
5-
PG_PORT=
6-
PG_USER=
7-
PG_PWD=
8-
PG_DB=
4+
DATABASE_URL=postgres://penguin:penguin@localhost:5432/penguin

.github/workflows/docker.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,35 @@ env:
1414
jobs:
1515
build-and-push-image:
1616
runs-on: ubuntu-latest
17-
strategy:
18-
fail-fast: false
1917
permissions:
2018
contents: read
2119
packages: write
2220

2321
steps:
2422
- name: Checkout repository
25-
uses: actions/checkout@v4.0.0
23+
uses: actions/checkout@v4
2624

2725
- name: Set up QEMU
28-
uses: docker/setup-qemu-action@v2.2.0
26+
uses: docker/setup-qemu-action@v3
2927

3028
- name: Set up Docker Buildx
31-
uses: docker/setup-buildx-action@v2.10.0
29+
uses: docker/setup-buildx-action@v3
3230

3331
- name: Log in to the Container registry
34-
uses: docker/login-action@v2.2.0
32+
uses: docker/login-action@v3
3533
with:
3634
registry: ${{ env.REGISTRY }}
3735
username: ${{ github.actor }}
3836
password: ${{ secrets.GITHUB_TOKEN }}
3937

4038
- name: Extract metadata (tags, labels) for Docker
4139
id: meta
42-
uses: docker/metadata-action@v4.6.0
40+
uses: docker/metadata-action@v5
4341
with:
4442
images: ghcr.io/${{ github.repository }}
4543

46-
- name: Build and push Docker image Drill4Net.Agent.Service
47-
uses: docker/build-push-action@v4.2.1
44+
- name: Build and push Docker image
45+
uses: docker/build-push-action@v5
4846
with:
4947
context: .
5048
file: ./Dockerfile

.gitignore

Lines changed: 15 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Created by https://www.toptal.com/developers/gitignore/api/windows,macos,linux,jetbrains+all,visualstudiocode,node,dotenv
2-
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,macos,linux,jetbrains+all,visualstudiocode,node,dotenv
1+
# Created by https://www.toptal.com/developers/gitignore/api/windows,macos,linux,jetbrains+all,visualstudiocode,rust,rust-analyzer,dotenv
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,macos,linux,jetbrains+all,visualstudiocode,rust,rust-analyzer,dotenv
33

44
### dotenv ###
55
.env
@@ -140,144 +140,22 @@ Temporary Items
140140
# iCloud generated files
141141
*.icloud
142142

143-
### Node ###
144-
# Logs
145-
logs
146-
*.log
147-
npm-debug.log*
148-
yarn-debug.log*
149-
yarn-error.log*
150-
lerna-debug.log*
151-
.pnpm-debug.log*
143+
### Rust ###
144+
# Generated by Cargo
145+
# will have compiled files and executables
146+
debug/
147+
target/
152148

153-
# Diagnostic reports (https://nodejs.org/api/report.html)
154-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
149+
# These are backup files generated by rustfmt
150+
**/*.rs.bk
155151

156-
# Runtime data
157-
pids
158-
*.pid
159-
*.seed
160-
*.pid.lock
152+
# MSVC Windows builds of rustc generate these, which store debugging information
153+
*.pdb
161154

162-
# Directory for instrumented libs generated by jscoverage/JSCover
163-
lib-cov
155+
### rust-analyzer ###
156+
# Can be generated by other build systems other than cargo (ex: bazelbuild/rust_rules)
157+
rust-project.json
164158

165-
# Coverage directory used by tools like istanbul
166-
coverage
167-
*.lcov
168-
169-
# nyc test coverage
170-
.nyc_output
171-
172-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
173-
.grunt
174-
175-
# Bower dependency directory (https://bower.io/)
176-
bower_components
177-
178-
# node-waf configuration
179-
.lock-wscript
180-
181-
# Compiled binary addons (https://nodejs.org/api/addons.html)
182-
build/Release
183-
184-
# Dependency directories
185-
node_modules/
186-
jspm_packages/
187-
188-
# Snowpack dependency directory (https://snowpack.dev/)
189-
web_modules/
190-
191-
# TypeScript cache
192-
*.tsbuildinfo
193-
194-
# Optional npm cache directory
195-
.npm
196-
197-
# Optional eslint cache
198-
.eslintcache
199-
200-
# Optional stylelint cache
201-
.stylelintcache
202-
203-
# Microbundle cache
204-
.rpt2_cache/
205-
.rts2_cache_cjs/
206-
.rts2_cache_es/
207-
.rts2_cache_umd/
208-
209-
# Optional REPL history
210-
.node_repl_history
211-
212-
# Output of 'npm pack'
213-
*.tgz
214-
215-
# Yarn Integrity file
216-
.yarn-integrity
217-
218-
# dotenv environment variable files
219-
.env.development.local
220-
.env.test.local
221-
.env.production.local
222-
.env.local
223-
224-
# parcel-bundler cache (https://parceljs.org/)
225-
.cache
226-
.parcel-cache
227-
228-
# Next.js build output
229-
.next
230-
out
231-
232-
# Nuxt.js build / generate output
233-
.nuxt
234-
dist
235-
236-
# Gatsby files
237-
.cache/
238-
# Comment in the public line in if your project uses Gatsby and not Next.js
239-
# https://nextjs.org/blog/next-9-1#public-directory-support
240-
# public
241-
242-
# vuepress build output
243-
.vuepress/dist
244-
245-
# vuepress v2.x temp and cache directory
246-
.temp
247-
248-
# Docusaurus cache and generated files
249-
.docusaurus
250-
251-
# Serverless directories
252-
.serverless/
253-
254-
# FuseBox cache
255-
.fusebox/
256-
257-
# DynamoDB Local files
258-
.dynamodb/
259-
260-
# TernJS port file
261-
.tern-port
262-
263-
# Stores VSCode versions used for testing VSCode extensions
264-
.vscode-test
265-
266-
# yarn v2
267-
.yarn/cache
268-
.yarn/unplugged
269-
.yarn/build-state.yml
270-
.yarn/install-state.gz
271-
.pnp.*
272-
273-
### Node Patch ###
274-
# Serverless Webpack directories
275-
.webpack/
276-
277-
# Optional stylelint cache
278-
279-
# SvelteKit build / generate output
280-
.svelte-kit
281159

282160
### VisualStudioCode ###
283161
.vscode/*
@@ -324,4 +202,4 @@ $RECYCLE.BIN/
324202
# Windows shortcuts
325203
*.lnk
326204

327-
# End of https://www.toptal.com/developers/gitignore/api/windows,macos,linux,jetbrains+all,visualstudiocode,node,dotenv
205+
# End of https://www.toptal.com/developers/gitignore/api/windows,macos,linux,jetbrains+all,visualstudiocode,rust,rust-analyzer,dotenv

0 commit comments

Comments
 (0)