Made it docker-compose ready

This commit is contained in:
nikurasu 2022-11-07 10:44:16 +01:00
parent d078e20aa3
commit 8447ae615e
5 changed files with 14 additions and 3 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
node_modules node_modules
src/dist src/dist
dev/docker/stacks/main/assets

View file

@ -0,0 +1,9 @@
version: '3'
services:
app:
image: nikurasukun/socialtree
container_name: socialtree
volumes:
- ./assets:/app/assets/
ports:
- 80:3000

1
dev/shell/docker-prod.sh Executable file
View file

@ -0,0 +1 @@
docker build -t nikurasukun/socialtree -f dev/docker/images/main/Dockerfile --no-cache .

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
if [[ ! -d "/app/assets/config" ]] && [[ ! -d "/app/assets/img" ]]; then if [[ ! -d "/app/assets/config" ]] && [[ ! -d "/app/assets/img" ]]; then
echo "No config found, installing default files" echo "No config found, installing default files"
cp -R /assets/ /app/assets cp -R /assets/* /app/assets
fi fi
echo "Starting node application" echo "Starting node application"

View file

@ -1,6 +1,6 @@
{ {
"name": "socialtree", "name": "socialtree",
"version": "0.0.0", "version": "0.1.0",
"description": "The awesome and damn simple, selfhosted alternative to linktree", "description": "The awesome and damn simple, selfhosted alternative to linktree",
"main": "src/index.js", "main": "src/index.js",
"author": "nikurasu", "author": "nikurasu",