Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Source code of the tutorial "Building a single-page application with Symfony 4 and Vue.js"

License

NotificationsYou must be signed in to change notification settings

onixspot/symfony-vuejs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caution: this is still work in progress.


Replace this title and the following description with your project name and description.

An example of a web application built with Vue.js, Symfony 5 and GraphQL.

Setup

Prerequisites

Linux

Install the latest version ofDocker andDocker Compose.

MacOS

We strongly recommend installingVagrant andVirtualBox.

Indeed, Docker has currently huge performance issues on MacOS and usingVagrant allows us to abstract the MacOS filesystem bringing an almost Linux-like experience regarding performances.

Windows

A Linux-like terminal is strongly advised in order to run theMakefile commands.Vagrant might also be an interesting solution regarding performances.

If not possible, you may also directly run the commands specified in theMakefile.For instance, instead of runningmake up, rundocker-compose up -d.

MacOS and Windows specific

Update yourhosts file with the following entry:

127.0.0.1   *.localhost

On MacOs, runsudo nano /etc/hosts to edit it.

On Windows, edit the fileC:\Windows\System32\drivers\etc\hosts with administrative privileges.

If you're using Vagrant, check there no application runningon port 80 (like Apache or another virtual machine).

If OK, runmake vagrant, thenvagrant up and finallyvagrant sshin order to connect to the virtual machine. From here you'll be able to run all the next commands likethe Linux users!

Update the variablePROJECT_NAME from theMakefile with your own project name.Only use alphanumeric characters (no spaces, distinguish words with_ or-).

Starting the Docker Compose stack

Copy the file.env.dist to a file named.env. For instance:

cp .env.dist .env

Edit the.env.dist by updating the default values ofDOMAIN,MYSQL_DATABASE andAPP_SECRETenvironment variables.

Next make sure there is no application running on port 80 (Vagrant users can skip this check).

Good? You may now start all the Docker containers with the following commands:

make up

It may take some time as each container will also setup itself, for instance byinstalling dependencies (PHP, JavaScript etc.), compiling sources (JavaScript)or run migrations for setting up the database structure.

Next time you run this command, the containers should be ready faster as most of thesetting up will already be done.

Once everything is ready, the following endpoints should be available:

Update the domain with the one used in your project.

What's next?

Configuring Git

You should ignore globally some folders like those generated by your IDE and Vagrant.

If not already done, you need to tell Git where to find your global.gitignore file.

For instance, on Linux/MacOS/Windows git bash:

git config --global core.excludesfile '~/.gitignore'

Windows cmd:

git config --global core.excludesfile "%USERPROFILE%\.gitignore"

Windows PowerShell:

git config --global core.excludesfile "$Env:USERPROFILE\.gitignore"

Then create the global.gitignore file according to the location specified previously.

You may now edit it, according to your environment, with:

# IDE.idea.vscode# MacOS.DS_Store# Vagrant.vagrant

Documentations

Make sure you have read the following documentations:

How to stop the stack?

As simple as themake up command, runmake down to stop the entire Docker Compose stack.

If you're a Vagrant user, you may also stop the virtual machine withvagrant halt.

If you're not going to work on the project for while, you may also destroythe virtual machine usingvagrant destroy.

About

Source code of the tutorial "Building a single-page application with Symfony 4 and Vue.js"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP62.7%
  • JavaScript18.9%
  • Vue16.0%
  • HTML2.4%

[8]ページ先頭

©2009-2025 Movatter.jp