fix: jenkins, pt5?

This commit is contained in:
Araozu 2024-10-06 21:50:00 -05:00
parent 3b110fc3a4
commit 29513a0a7f
4 changed files with 24 additions and 2 deletions

1
.gitignore vendored
View File

@ -2,4 +2,5 @@ node_modules
public/css/output.css public/css/output.css
.env .env
tmp tmp
main

8
Jenkinsfile vendored
View File

@ -16,7 +16,13 @@ pipeline {
stage('Populate env') { stage('Populate env') {
steps { steps {
sh 'rm .env || true' sh 'rm .env || true'
sh 'echo "PORT=8007" > .env' sh 'echo "PORT=8007" >> .env'
sh 'echo "DB_HOST=localhost" >> .env'
sh 'echo "DB_PORT=5432" >> .env'
sh 'echo "DB_DATABASE=music" >> .env'
sh 'echo "DB_USERNAME=root" >> .env'
sh 'echo "DB_PASSWORD=root" >> .env'
sh 'echo "DB_SCHEMA=public" >> .env'
} }
} }
stage('Profit') { stage('Profit') {

3
db/init.sql Normal file
View File

@ -0,0 +1,3 @@
create database music;

View File

@ -1,5 +1,5 @@
services: services:
dev.araozu.music: music-to-go:
container_name: music-to-go container_name: music-to-go
build: build:
context: . context: .
@ -7,3 +7,15 @@ services:
ports: ports:
- "8007:8007" - "8007:8007"
restart: unless-stopped restart: unless-stopped
music-to-go-db:
image: postgres
container_name: music-to-go-db
restart: unless-stopped
# set shared memory limit when using docker-compose
shm_size: 128mb
volumes:
- ./db:/docker-entrypoint-initdb.d
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root