Last active
January 16, 2025 16:38
-
-
Save wilcorrea/fdeac13e9e926b3f1510ef4e11ef6381 to your computer and use it in GitHub Desktop.
Quasar with docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ ! -d /var/www/app/node_modules ]]; then | |
echo "~> installing dependencies" | |
yarn install | |
fi | |
if [[ ! -f /home/node/bin/node && -f /usr/local/bin/node ]]; then | |
echo "~> expose bin" | |
cp /usr/local/bin/node /home/node/bin/node | |
echo "~> fix permissions" | |
chown -R node:node . | |
fi | |
echo "Details: '$(pwd)' | '$(quasar -v)'" | |
echo "~> starting dev" | |
quasar dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
# services | |
services: | |
# app | |
quasar-app: | |
container_name: quasar-app | |
user: node | |
image: tevun/quasar:latest | |
working_dir: /var/www/app | |
command: bash /var/www/app/docker-compose.sh | |
volumes: | |
- .:/var/www/app | |
- ./.bin:/home/node/bin | |
ports: | |
- 8000:8000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tevun/quasar | |
FROM node:alpine | |
RUN apk --update add openssh-client git | |
RUN npm install --global \ | |
@vue/[email protected] && \ | |
@vue/[email protected] \ | |
@quasar/[email protected]\ | |
[email protected] | |
RUN mkdir /home/node/app | |
WORKDIR /home/node/app | |
CMD /bin/sh |
hey @developerluanramos If you're asking about using yarn within the host, the docker-compose.sh is utilized within the container created using docker-compose.yml (command: bash /var/www/app/docker-compose.sh) - we don't need to install yarn on the host. If you're inquiring about the mixed usage, there's no specific reason except for my indecision three years ago! (:rofl:)"
@wilcorrea thank you for your response.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @wilcorrea.
Let me ask you something that I didn't understand.
Why in Dockerfile you are using npm and in docker-compose.sh you are using yarn?
Regards!