first commit
This commit is contained in:
parent
77f186106b
commit
dc26cc27da
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal 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
17
dockerfile
Normal 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"]
|
||||
12
install.sh
12
install.sh
@ -1,9 +1,13 @@
|
||||
#! /bin/bash
|
||||
|
||||
npm install
|
||||
cp .env.example .env
|
||||
cp colors.json.example colors.json
|
||||
if [ ! -f .env ]; then
|
||||
cp .env.example .env
|
||||
fi
|
||||
|
||||
npm run build
|
||||
if [ ! -f colors.json ]; then
|
||||
cp colors.json.example colors.json
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
echo "Done!"
|
||||
Loading…
x
Reference in New Issue
Block a user