Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lampserver
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Daniel González Peña
lampserver
Commits
620de77b
Commit
620de77b
authored
Sep 22, 2017
by
Daniel González Peña
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes web project layout, keeping mysql folder outside
parent
0de6a6c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
README.md
README.md
+20
-11
No files found.
README.md
View file @
620de77b
...
...
@@ -10,26 +10,35 @@ cd lampserver
docker build . -t lampserver
```
# Starting your web project
You need to create a folder where your web files and the database will reside.
```
# create a project directory
mkdir my-web-project
cd my-web-project
# create a subdirectory for web files
mkdir www
```
Inside
`my-web-project/www`
you place your web files.
# Running the server
Go to
the directory
**where your web files are placed**
,
and run:
Go to
your web project directory (e.g.,
`my-web-project`
)
and run:
```
docker run -it -e
PHP_DISPLAY_ERRORS=On -e DOCKER_USER_ID=`id -u \`whoami\``
\
-
p "80:80" -v ${PWD}:/app -v ${PWD}/mysql:/var/lib/mysql --name lampserver-1
\
--rm lampserver
docker run -it -e
APACHE_ROOT=www -e PHP_DISPLAY_ERRORS=On
\
-
e DOCKER_USER_ID=`id -u \`whoami\`` -p "80:80" -v ${PWD}:/app
\
-
v ${PWD}/mysql:/var/lib/mysql --name lampserver-1 -
-rm lampserver
```
`lampserver-1`
is the name of the docker
*container*
, i.e, a running instance
`lampserver-1`
is the name of the docker
*container*
, i.e
.
, a running instance
of the
`lampserver`
image.
The first time you run the server in your directory, a MySQL data folder will
be created inside your web directory under
`./mysql`
(you can change this if you want changing
`-v <directory_for_mysql_data>:/var/lib/mysql`
).
be created inside your project directory
`./mysql`
A password for the
`admin`
user of MySQL is shown the first time.
Your server is available at: http://localhost (if you want to use another port
of your host machine, change
`-p "80:80"`
by
`-p "<another_port>:80"`
)
Your server is available at: http://localhost
(if you want to use another port of your host machine, change
`-p "80:80"`
by
`-p "<another_port>:80"`
)
# Using MySQL
1.
You can use PHPMyAdmin by going to http://localhost/phpmyadmin. You have
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment