first commit

This commit is contained in:
Juan Felipe Zapata Moreno 2025-09-18 13:52:21 -06:00
parent 77f186106b
commit dc26cc27da
3 changed files with 43 additions and 4 deletions

18
docker-compose.yml Normal file
View File

@ -0,0 +1,18 @@
services:
gols-frontend-v1:
build:
context: .
dockerfile: dockerfile
ports:
- "${APP_PORT}:5173"
volumes:
- .:/var/www/gols-frontend-v1
- frontend-v1:/var/www/gols-frontend-v1/node_modules
networks:
- gols-network
volumes:
frontend-v1:
driver: local
networks:
gols-network:
driver: bridge

17
dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM node:22-alpine AS build
WORKDIR /var/www/gols-frontend-v1
COPY install.sh /usr/local/bin/install.sh
RUN chmod +x /usr/local/bin/install.sh
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
ENTRYPOINT ["sh","/usr/local/bin/install.sh"]
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]

View File

@ -1,9 +1,13 @@
#! /bin/bash #! /bin/bash
npm install if [ ! -f .env ]; then
cp .env.example .env cp .env.example .env
cp colors.json.example colors.json fi
npm run build if [ ! -f colors.json ]; then
cp colors.json.example colors.json
fi
exec "$@"
echo "Done!" echo "Done!"