1
00:00:02,060 --> 00:00:04,130
To create a level application,

2
00:00:04,130 --> 00:00:06,550
we can have a look at the official level docs.

3
00:00:06,550 --> 00:00:09,220
And they are under getting started.

4
00:00:09,220 --> 00:00:11,120
We see these requirements,

5
00:00:11,120 --> 00:00:13,770
but if we scroll down to installing level,

6
00:00:13,770 --> 00:00:17,014
we see this command, which you can execute

7
00:00:17,014 --> 00:00:21,040
to install level or this command.

8
00:00:21,040 --> 00:00:23,260
And we will use this command here,

9
00:00:23,260 --> 00:00:28,063
since it uses just composer to then set up a level project.

10
00:00:28,980 --> 00:00:31,150
We'll tweak it a little bit regarding the folder

11
00:00:31,150 --> 00:00:32,759
in which we set up this project,

12
00:00:32,759 --> 00:00:34,503
but generally this the command.

13
00:00:35,670 --> 00:00:40,150
So, we can already copy this command here

14
00:00:40,150 --> 00:00:42,943
and then go back and open our terminal.

15
00:00:43,810 --> 00:00:47,650
And now I wanna run just this composer container.

16
00:00:47,650 --> 00:00:50,590
And that is something I showed you in the last section.

17
00:00:50,590 --> 00:00:53,510
You can run individual containers

18
00:00:53,510 --> 00:00:55,840
in your docker compose YAML file

19
00:00:55,840 --> 00:00:58,763
with the docker dash compose run command.

20
00:00:59,880 --> 00:01:04,330
You don't need to start the entire container set up here,

21
00:01:04,330 --> 00:01:06,620
you can just run single containers.

22
00:01:06,620 --> 00:01:08,440
And that is what you typically do,

23
00:01:08,440 --> 00:01:10,490
with these utility containers.

24
00:01:10,490 --> 00:01:13,530
So here I wanna run this composer container.

25
00:01:13,530 --> 00:01:16,840
So I wanna docker compose run composer,

26
00:01:16,840 --> 00:01:19,720
and I will add --rm to make sure

27
00:01:19,720 --> 00:01:21,900
that everything related to the container

28
00:01:21,900 --> 00:01:23,840
is removed when it's shut down,

29
00:01:23,840 --> 00:01:27,570
so that we don't have a lot of debt containers.

30
00:01:27,570 --> 00:01:29,453
After running this a couple of times.

31
00:01:30,470 --> 00:01:33,240
Then, we can paste in that command we copied

32
00:01:33,240 --> 00:01:35,470
from the level site, though of course

33
00:01:35,470 --> 00:01:38,270
we don't need composer twice here

34
00:01:38,270 --> 00:01:41,320
since our entry point in this composer docker file

35
00:01:41,320 --> 00:01:44,410
is already this composer executable.

36
00:01:44,410 --> 00:01:47,310
So we will call create project on that executable.

37
00:01:47,310 --> 00:01:50,890
And then, I got one last edition at the end here

38
00:01:50,890 --> 00:01:52,830
we need to specify the folder in which

39
00:01:52,830 --> 00:01:55,823
this should be created, and this should be just dot.

40
00:01:56,820 --> 00:01:59,400
Keep in mind that because of our docker file,

41
00:01:59,400 --> 00:02:02,630
this all runs in this folder inside of the container,

42
00:02:02,630 --> 00:02:05,020
and that is then the root folder in which

43
00:02:05,020 --> 00:02:07,143
this level project should be created.

44
00:02:08,729 --> 00:02:10,639
And thanks to our bind Mount here,

45
00:02:10,639 --> 00:02:13,880
this will then be reflected in this source folder.

46
00:02:13,880 --> 00:02:16,633
So let's give this a try, and let's hit enter.

47
00:02:17,730 --> 00:02:22,250
And this is looking quite decent, it's doing something here.

48
00:02:22,250 --> 00:02:25,070
It's building the image to be precise.

49
00:02:25,070 --> 00:02:26,900
So that's working,

50
00:02:26,900 --> 00:02:30,090
let's see what it does once it's done.

51
00:02:30,090 --> 00:02:31,660
And that also looks promising.

52
00:02:31,660 --> 00:02:35,810
It's creating a level project at our root folder,

53
00:02:35,810 --> 00:02:40,810
which ends up the container is this var/www/html folder.

54
00:02:41,390 --> 00:02:43,580
So let's wait for this to finish.

55
00:02:43,580 --> 00:02:45,840
And this can take a couple of minutes.

56
00:02:45,840 --> 00:02:47,723
So I'll be back once this is done,

57
00:02:49,110 --> 00:02:50,950
and this is looking good,

58
00:02:50,950 --> 00:02:53,670
it's finishing up here and it took quite a while.

59
00:02:53,670 --> 00:02:54,730
That's normal.

60
00:02:54,730 --> 00:02:57,840
So let's see if it finishes successfully.

61
00:02:57,840 --> 00:02:59,710
And here we are.

62
00:02:59,710 --> 00:03:01,240
So, that looks good.

63
00:03:01,240 --> 00:03:04,300
And if we now have a look into the source folder,

64
00:03:04,300 --> 00:03:08,713
inside of it, we see our level application.

65
00:03:09,980 --> 00:03:12,130
And, in case you know level,

66
00:03:12,130 --> 00:03:15,710
this is now where you could start writing level code.

67
00:03:15,710 --> 00:03:17,760
Now, we're not going to do this together here.

68
00:03:17,760 --> 00:03:19,360
This is no level course.

69
00:03:19,360 --> 00:03:21,780
So, we're not going to worry about that.

70
00:03:21,780 --> 00:03:24,410
I just want to show you how you can set it up.

71
00:03:24,410 --> 00:03:27,070
Now nonetheless, we're not done at this point.

72
00:03:27,070 --> 00:03:29,200
Now of course, we also want to see

73
00:03:29,200 --> 00:03:31,410
whether we can run this application

74
00:03:31,410 --> 00:03:34,093
with our free application servers.

